"""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."""