Errors reference¶
All public exceptions inherit from TLDecPyError and carry a message and
optional hint string. Call .to_detail() to get a serialisable
ErrorDetail payload.
try:
tl.fit_multi(T, I, peaks=[], bg=None)
except tl.TLDecPyError as exc:
detail = exc.to_detail()
print(detail.error_code, detail.hint)
tldecpy.errors.TLDecPyError ¶
Bases: Exception
Base class for all public package errors.
Source code in tldecpy/errors.py
to_detail ¶
Convert the exception to a serializable error payload.
tldecpy.errors.PygcdError ¶
Bases: TLDecPyError
Backward-compatible alias for legacy public API.
Source code in tldecpy/errors.py
tldecpy.errors.ModelKeyError ¶
Bases: TLDecPyError, KeyError
Raised when a model key is not found in the model registry.
Source code in tldecpy/errors.py
tldecpy.errors.DomainError ¶
Bases: TLDecPyError, ValueError
Raised when a parameter is outside its physical domain.
Source code in tldecpy/errors.py
tldecpy.errors.ConvergenceError ¶
tldecpy.errors.TypingError ¶
Bases: TLDecPyError, TypeError
Raised for invalid input data types.
Source code in tldecpy/errors.py
tldecpy.errors.DatasetError ¶
Bases: TLDecPyError, FileNotFoundError
Raised when a dataset cannot be found or loaded.