You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
468 B
20 lines
468 B
"""Error definitions for Corvus."""
|
|
from typing import Dict
|
|
|
|
|
|
class BaseError(RuntimeError):
|
|
"""Corvus Base Error Class."""
|
|
|
|
def __init__(
|
|
self,
|
|
message: str = 'Unknown error',
|
|
extra_fields: Dict[str, str] = None) -> None:
|
|
"""Populate The Error Definition."""
|
|
super().__init__(message)
|
|
self.extra_fields = extra_fields
|
|
|
|
|
|
class ValidationError(BaseError):
|
|
"""Corvus Validation Error."""
|
|
|
|
pass
|