clophfit.fitting.errors#
Error classes for ClopHfit.
This module defines custom exceptions used throughout the ClopHfit package for better error handling and user-friendly error messages.
Exceptions#
Base class for all ClopHfit errors. |
|
Base class for fitting errors. |
|
Raised to prevent fitting failure for too few data points. |
|
Raised when fitting fails to converge. |
|
Raised when input data is invalid. |
|
Base class for CLI-related errors. |
|
Raised when an input file has invalid format. |
|
Raised when data fails validation checks. |
|
Raised when required file dependencies are missing. |
Module Contents#
- exception clophfit.fitting.errors.ClopHfitError#
Bases:
ExceptionBase class for all ClopHfit errors.
- exception clophfit.fitting.errors.FitError#
Bases:
ClopHfitErrorBase class for fitting errors.
- exception clophfit.fitting.errors.InsufficientDataError#
Bases:
FitErrorRaised to prevent fitting failure for too few data points.
- exception clophfit.fitting.errors.ConvergenceError#
Bases:
FitErrorRaised when fitting fails to converge.
- exception clophfit.fitting.errors.InvalidDataError#
Bases:
FitErrorRaised when input data is invalid.
- exception clophfit.fitting.errors.CLIError#
Bases:
ClopHfitErrorBase class for CLI-related errors.
- exception clophfit.fitting.errors.FileFormatError(filepath, expected_format, details='')#
Bases:
CLIErrorRaised when an input file has invalid format.
- Parameters:
filepath (str) – Path to the problematic file.
expected_format (str) – Description of expected file format.
details (str, optional) – Additional details about the error.
- exception clophfit.fitting.errors.DataValidationError(message, suggestions=None)#
Bases:
CLIErrorRaised when data fails validation checks.
- Parameters:
message (str) – Description of the validation error.
suggestions (list[str] | None) – List of suggestions to fix the error.
- exception clophfit.fitting.errors.MissingDependencyError(missing_file, required_by, reason)#
Bases:
CLIErrorRaised when required file dependencies are missing.
- Parameters:
missing_file (str) – The file that is missing.
required_by (str) – What requires this file.
reason (str) – Why this file is needed.