Coverage for src/lexigram/admin/actions/exceptions.py: 100%
7 statements
« prev ^ index » next coverage.py v7.15.4, created at 2026-08-24 23:39 +0800
« prev ^ index » next coverage.py v7.15.4, created at 2026-08-24 23:39 +0800
1"""Action exceptions for lexigram-admin.
3Provides domain-specific exception classes for the action subsystem.
4All exceptions inherit from AdminError to ensure consistent error
5handling across the admin package.
6"""
8from __future__ import annotations
10from lexigram.admin.exceptions import AdminError
13class ActionError(AdminError):
14 """Base exception for all action-related errors."""
16 _code = "LEX_ERR_ADMIN_ACTION_001"
19class PermissionDenied(ActionError): # noqa: N818
20 """Raised when a user lacks permission to execute an action."""
22 _code = "LEX_ERR_ADMIN_ACTION_002"
25__all__ = [
26 "ActionError",
27 "PermissionDenied",
28]