"""
Contains custom errors and warnings.
Errors should derive from Exception or another custom error. Custom errors are
only needed it standard errors, for example ValueError or TypeError, are not
accurate descriptions of the reason for the error.
Warnings should derive from either an existing warning or another custom
warning, and should usually be accompanied by a sting using the format
warning_name_doc that services as a generic message to use when the warning is
raised.
"""
# Errors
[docs]class PerfectSeparationError(Exception):
pass
[docs]class MissingDataError(Exception):
pass
[docs]class X13NotFoundError(Exception):
pass
[docs]class X13Error(Exception):
pass
# Warning
[docs]class X13Warning(Warning):
pass
[docs]class IOWarning(RuntimeWarning):
pass
[docs]class ModuleUnavailableWarning(Warning):
pass
module_unavailable_doc = """
The module {0} is not available. Cannot run in parallel.
"""
[docs]class ConvergenceWarning(UserWarning):
pass
convergence_doc = """
Failed to converge on a solution.
"""
[docs]class CacheWriteWarning(UserWarning):
pass
[docs]class IterationLimitWarning(UserWarning):
pass
iteration_limit_doc = """
Maximum iteration reached.
"""
[docs]class InvalidTestWarning(UserWarning):
pass