Add config, git_manager, exceptions
This commit is contained in:
38
src/promptforge/core/exceptions.py
Normal file
38
src/promptforge/core/exceptions.py
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
class PromptForgeError(Exception):
|
||||||
|
"""Base exception for PromptForge errors."""
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
class InvalidPromptError(PromptForgeError):
|
||||||
|
"""Raised when a prompt YAML is malformed."""
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
class ProviderError(PromptForgeError):
|
||||||
|
"""Raised when LLM API operations fail."""
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
class ValidationError(PromptForgeError):
|
||||||
|
"""Raised when response validation fails."""
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
class GitError(PromptForgeError):
|
||||||
|
"""Raised when git operations fail."""
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
class RegistryError(PromptForgeError):
|
||||||
|
"""Raised when registry operations fail."""
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
class MissingVariableError(PromptForgeError):
|
||||||
|
"""Raised when a required template variable is missing."""
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
class ConfigurationError(PromptForgeError):
|
||||||
|
"""Raised when configuration is invalid."""
|
||||||
|
pass
|
||||||
Reference in New Issue
Block a user