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"""
[docs] class InputError(NoobError): """Error with tube input"""
[docs] class InputWarning(NoobWarning): """Warning with tube input"""
# -------------------------------------------------- # 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 InputMissingError(InputError, ValueError): """ A requested input was not provided in the given scope """
[docs] class ExtraInputError(InputError, ValueError): """ Extra input was provided in some scope where it was not specified """
[docs] class ExtraInputWarning(InputWarning, RuntimeWarning): """ Extra input was provided in some scope where it was not specified, but it was ignorable """
[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! """