Source code for noob.exceptions
[docs]
class NoobError(Exception):
"""Base exception type"""
[docs]
class NoobWarning(UserWarning):
"""Base warning type"""
# -----------------------------------------------------
# Top-level error categories
# use these as a mixin with another base exception type
# -----------------------------------------------------
[docs]
class ConfigError(NoobError):
"""Base config error type"""
[docs]
class ConfigWarning(NoobWarning):
"""Base config warning type"""
[docs]
class SchedulerError(NoobError):
"""Base error in the scheduler"""
[docs]
class StoreError(NoobError):
"""Base store error type"""
[docs]
class TubeError(NoobError):
"""Base tube error type"""
[docs]
class RunnerError(NoobError):
"""Base runner error type"""
# --------------------------------------------------
# Actual error types you should use
# --------------------------------------------------
[docs]
class ConfigMismatchError(ConfigError, ValueError):
"""
Mismatch between the fields in some config model and the fields in the model it is configuring
"""
[docs]
class EntrypointImportWarning(ConfigWarning, ImportWarning):
"""Some problem with a configuration entypoint, usually when importing"""
[docs]
class AlreadyRunningError(RunnerError, RuntimeError):
"""
A tube is already running!
"""
[docs]
class EpochCompletedError(SchedulerError, ValueError):
"""
An epoch was already completed, but some attempt was made to update it or use it.
"""
[docs]
class EpochExistsError(SchedulerError, ValueError):
"""
Epoch already exists and is active, but attempted to create it.
"""
[docs]
class NotOutYetError(SchedulerError, ValueError):
"""
Node was marked done but wasn't passed out yet!
"""
[docs]
class NotAddedError(SchedulerError, ValueError):
"""
Node was marked done but wasn't added!
"""
[docs]
class AlreadyDoneError(SchedulerError, ValueError):
"""
Node was marked done, but it was already done!
"""