Spaces:
Sleeping
Sleeping
Download app/common/exceptions.py from TheJackBright/polyguard-openenv: direct link, hf CLI and curl.
- Browser
- Download file 447 Bytes
-
https://huggingface.co/spaces/TheJackBright/polyguard-openenv/resolve/main/app/common/exceptions.py
- Command line
-
hf download hf://spaces/TheJackBright/polyguard-openenv/app/common/exceptions.py
-
curl -L -o exceptions.py https://huggingface.co/spaces/TheJackBright/polyguard-openenv/resolve/main/app/common/exceptions.py
447 Bytes
| """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.""" | |