Source code for rex.utilities.exceptions

# -*- coding: utf-8 -*-
"""
Custom Exceptions and Errors
"""


[docs]class FileInputError(Exception): """ Error during input file checks. """
[docs]class JSONError(Exception): """ Error reading json file. """
[docs]class ExecutionError(Exception): """ Error for execution failure """
[docs]class HpcError(Exception): """ Error for HPC failure """
[docs]class SlurmError(Exception): """ Error for SLURM failure """
[docs]class ExtrapolationWarning(Warning): """ Warning for when value will be extrapolated """
[docs]class MoninObukhovExtrapolationError(Exception): """ Custom error when WindResource._monin_obhukov_extrapolation fails """
[docs]class ResourceKeyError(Exception): """ KeyError for Resources """
[docs]class ResourceRuntimeError(Exception): """ RuntimeError for Resources """
[docs]class ResourceValueError(Exception): """ ValueError for Resources """
[docs]class ResourceError(Exception): """ Error for poorly formatted resource. """
[docs]class RetryError(Exception): """ Custom Error for Retry Decorator """
[docs]class ParallelExecutionWarning(Warning): """ Warning for parallel job execution. """
[docs]class PbsWarning(Warning): """ Warning for PBS errors/warnings """
[docs]class SlurmWarning(Warning): """ Warning for SLURM errors/warnings """
[docs]class ResourceWarning(Warning): """ Warning during .h5 handling """
[docs]class RetryWarning(Warning): """ Warning that Retry decorator is trying again """
[docs]class SAMInputWarning(Warning): """ Warning for bad SAM inputs """
[docs]class LoggerWarning(Warning): """ Warning for bad logger inputs """
[docs]class HandlerRuntimeError(Exception): """ RuntimeError for Handlers """
[docs]class HandlerValueError(Exception): """ ValueError for Handlers """