Source code for sdgx.exceptions
[docs]
class SdgxError(Exception):
"""
Base class for exceptions in this module.
"""
EXIT_CODE = 100
ERROR_CODE = 1001
[docs]
class NonParametricError(Exception):
"""
Exception to indicate that a model is not parametric.
"""
EXIT_CODE = 101
ERROR_CODE = 2001
[docs]
class ManagerError(SdgxError):
"""
Exception to indicate that exception when using manager.
"""
EXIT_CODE = 102
ERROR_CODE = 3000
[docs]
class NotFoundError(ManagerError):
"""
Exception to indicate that a model is not found.
"""
ERROR_CODE = 3001
[docs]
class RegisterError(ManagerError):
"""
Exception to indicate that exception when registering.
"""
ERROR_CODE = 3002
[docs]
class InitializationError(ManagerError):
"""
Exception to indicate that exception when initializing model.
"""
ERROR_CODE = 3003
[docs]
class ManagerLoadModelError(ManagerError):
"""
Exception to indicate that exception when loading model for :ref:`ModelManager`.
"""
ERROR_CODE = 3004
[docs]
class SynthesizerError(SdgxError):
"""
Exception to indicate that exception when synthesizing model.
"""
EXIT_CODE = 103
ERROR_CODE = 4000
[docs]
class SynthesizerInitError(SynthesizerError):
ERROR_CODE = 4001
[docs]
class SynthesizerSampleError(SynthesizerError):
ERROR_CODE = 4002
[docs]
class SynthesizerProcessorError(SynthesizerError):
ERROR_CODE = 4003
[docs]
class CacheError(SdgxError):
"""
Exception to indicate that exception when using cache.
"""
EXIT_CODE = 104
ERROR_CODE = 5001
[docs]
class DataLoaderInitError(SdgxError):
"""
Exception to indicate that exception when initializing dataloader.
"""
EXIT_CODE = 106
ERROR_CODE = 7001
[docs]
class CannotExportError(SdgxError):
"""
Exception to indicate that exception when exporting data.
"""
EXIT_CODE = 107
ERROR_CODE = 8001
[docs]
class DataModelError(SdgxError):
"""
Exception to indicate that exception in all data models.
"""
EXIT_CODE = 108
ERROR_CODE = 9001
[docs]
class RelationshipInitError(DataModelError):
ERROR_CODE = 9003
[docs]
class InspectorInitError(DataModelError):
ERROR_CODE = 9007