Source code for reV.utilities.exceptions

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


[docs]class reVError(Exception): """ Generic Error for reV """
[docs]class ConfigError(Exception): """ Error for bad configuration inputs """
[docs]class InputError(Exception): """ Error during input checks. """
[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 PipelineError(Exception): """ Error for pipeline execution failure """
[docs]class HandlerKeyError(Exception): """ KeyError for Handlers """
[docs]class HandlerRuntimeError(Exception): """ RuntimeError for Handlers """
[docs]class HandlerValueError(Exception): """ ValueError for Handlers """
[docs]class MultiFileExclusionError(Exception): """ Error for bad multi file exclusion inputs. """
[docs]class CollectionValueError(HandlerValueError): """ ValueError for collection handler. """
[docs]class CollectionRuntimeError(HandlerRuntimeError): """ RuntimeError for collection handler. """
[docs]class ResourceError(Exception): """ Error for poorly formatted resource. """
[docs]class PySAMVersionError(Exception): """ Version error for SAM installation """
[docs]class SAMExecutionError(Exception): """ Execution error for SAM simulations """
[docs]class SAMInputError(Exception): """ Input error for SAM simulations """
[docs]class reVLossesValueError(ValueError): """Value Error for reV losses module. """
[docs]class SupplyCurveError(Exception): """ Execution error for SAM simulations """
[docs]class EmptySupplyCurvePointError(SupplyCurveError): """ Execution error for SAM simulations """
[docs]class SupplyCurveInputError(SupplyCurveError): """ Execution error for SAM simulations """
[docs]class NearestNeighborError(Exception): """ Execution error for bad nearest neighbor mapping results. """
[docs]class DataShapeError(Exception): """ Error with mismatched data shapes. """
[docs]class ExclusionLayerError(Exception): """ Error with bad exclusion data """
[docs]class ProjectPointsValueError(Exception): """ Error for bad ProjectPoints CLI values """
[docs]class OffshoreWindInputError(Exception): """ Error for bad offshore wind inputs """
[docs]class WhileLoopPackingError(Exception): """ Error for stuck in while loop while packing """
[docs]class OutputWarning(Warning): """ Warning for suspect output files or data """
[docs]class ExtrapolationWarning(Warning): """ Warning for when value will be extrapolated """
[docs]class InputWarning(Warning): """ Warning for unclear or default configuration inputs """
[docs]class OffshoreWindInputWarning(Warning): """ Warning for potentially dangerous offshore wind inputs """
[docs]class ConfigWarning(Warning): """ Warning for unclear or default configuration inputs """
[docs]class SAMInputWarning(Warning): """ Warning for bad SAM inputs """
[docs]class SAMExecutionWarning(Warning): """ Warning for problematic SAM execution """
[docs]class PySAMVersionWarning(Warning): """ Version warning for SAM installation """
[docs]class reVLossesWarning(Warning): """Warning for reV losses module. """
[docs]class ParallelExecutionWarning(Warning): """ Warning for parallel job execution. """
[docs]class SlurmWarning(Warning): """ Warning for SLURM errors/warnings """
[docs]class HandlerWarning(Warning): """ Warning during .h5 handling """
[docs]class CollectionWarning(Warning): """ Warning during .h5 collection """
[docs]class FileInputWarning(Warning): """ Warning during input file checks. """
[docs]class reVDeprecationWarning(Warning): """ Warning of deprecated feature. """