Spaces:
Running
Running
File size: 447 Bytes
877add7 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | """Custom exceptions."""
from __future__ import annotations
class PolyGuardError(Exception):
"""Base exception for project errors."""
class InvalidActionError(PolyGuardError):
"""Raised when an action is malformed or disallowed."""
class SafetyVetoError(PolyGuardError):
"""Raised when safety governance rejects an action."""
class ParserError(PolyGuardError):
"""Raised when structured policy output cannot be parsed."""
|