polyguard-openenv / app /common /exceptions.py
TheJackBright's picture
Deploy PolyGuard OpenEnv Space
877add7 verified
"""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."""