Error Handling
Bases: ValueError
Raised when an open-circuit voltage (Voc) value cannot be located.
Source code in utils\errors\errors.py
1 2 3 | |
Bases: ValueError
Raised when a short-circuit current (Isc) value cannot be located.
Source code in utils\errors\errors.py
6 7 8 | |
Bases: ValueError
Raised when a requested observable cannot be derived from the available data.
Source code in utils\errors\errors.py
11 12 13 | |
Bases: KeyError
Raised when a dataset or configuration refers to an unknown device type.
Source code in utils\errors\errors.py
16 17 18 | |
Bases: RuntimeError
Raised when the implementations package fails validation.
Source code in utils\errors\errors.py
21 22 | |
Wrap a function so that :class:VocNotFoundError is logged and suppressed.
Parameters
func: Callable to execute. logger: Logger instance used to record the error.
Returns
Callable[..., Any]
A wrapper that calls func and logs any :class:VocNotFoundError
instead of propagating it.
Source code in utils\errors\logging.py
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | |
Decorator that logs and re-raises any exception raised by func.
Parameters
func: Callable to wrap. logger: Logger instance used to record the exception and traceback.
Returns
Callable[..., Any] A wrapper that logs the exception details before re-raising them.
Source code in utils\errors\logging.py
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | |