Files
specs/app/services/exceptions.py
T
2026-10-07 19:57:07 +00:00

59 lines
1.2 KiB
Python

"""
Service exceptions for resource allocation
"""
class ResourceAllocationError(Exception):
"""Base exception for resource allocation errors"""
pass
class ResourceNotFoundError(ResourceAllocationError):
"""Resource not found"""
pass
class SystemNotFoundError(ResourceAllocationError):
"""System not found"""
pass
class GuardianNotFoundError(ResourceAllocationError):
"""Guardian not found"""
pass
class AllocationError(ResourceAllocationError):
"""Allocation failed"""
pass
class ValidationError(ResourceAllocationError):
"""Validation failed"""
pass
class InsufficientBalanceError(ResourceAllocationError):
"""Not enough remaining balance"""
pass
class CoreInCommonError(ResourceAllocationError):
"""Cannot allocate Core to Common part"""
pass
class InvalidGuardianError(ResourceAllocationError):
"""Guardian doesn't belong to specified System"""
pass
class ProjectMismatchError(ResourceAllocationError):
"""Resource and System belong to different Projects"""
pass
class CoreAlreadyExistsError(ResourceAllocationError):
"""Cannot create second Core for same Guardian"""
pass