Source code for promptguard.exceptions

"""Custom exceptions for PromptGuard."""


[docs] class PromptGuardError(Exception): """Base exception for PromptGuard errors.""" pass
[docs] class ModelLoadError(PromptGuardError): """Raised when model fails to load.""" pass
[docs] class ValidationError(PromptGuardError): """Raised when input validation fails.""" pass
[docs] class ConfigurationError(PromptGuardError): """Raised when configuration is invalid.""" pass
[docs] class InferenceError(PromptGuardError): """Raised when inference fails.""" pass