example_fgen_basic.pyfgen_runtime.exceptions#
Runtime exceptions
Classes:
| Name | Description |
|---|---|
CompiledExtensionNotFoundError |
Raised when a compiled extension can't be imported i.e. found |
MissingOptionalDependencyError |
Raised when an optional dependency is missing |
NotInitialisedError |
Raised when the wrapper around the Fortran module hasn't been initialised yet |
UnallocatedMemoryError |
Raised when we try to access memory that has not yet been allocated |
WrapperError |
Base exception for errors that arise from wrapper functionality |
CompiledExtensionNotFoundError #
Bases: ImportError
Raised when a compiled extension can't be imported i.e. found
Source code in src/example_fgen_basic/pyfgen_runtime/exceptions.py
MissingOptionalDependencyError #
Bases: ImportError
Raised when an optional dependency is missing
For example, plotting dependencies like matplotlib
Methods:
| Name | Description |
|---|---|
__init__ |
Initialise the error |
Source code in src/example_fgen_basic/pyfgen_runtime/exceptions.py
__init__ #
Initialise the error
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
callable_name
|
str
|
The name of the callable that requires the dependency |
required |
requirement
|
str
|
The name of the requirement |
required |
Source code in src/example_fgen_basic/pyfgen_runtime/exceptions.py
NotInitialisedError #
Bases: WrapperError
Raised when the wrapper around the Fortran module hasn't been initialised yet
Source code in src/example_fgen_basic/pyfgen_runtime/exceptions.py
UnallocatedMemoryError #
Bases: ValueError
Raised when we try to access memory that has not yet been allocated
We can't always catch this error, but this is what we raise when we can.