fgen_runtime.exceptions#

Exception classes for wrapper-specific errors

WrapperError#

class WrapperError[source]#

Bases: ValueError

Base exception for errors that arise from wrapper

WrapperErrorUnknownCause#

class WrapperErrorUnknownCause(msg)[source]#

Bases: WrapperError

Raised when there is an error with the wrapper, but we have nothing to help debug

InitialisationError#

class InitialisationError(instance, method=None)[source]#

Bases: WrapperError

Raised when the wrapper around the Fortran module hasn’t been initialised yet

CompiledExtensionNotFoundError#

class CompiledExtensionNotFoundError(compiled_extension_name)[source]#

Bases: ImportError

Raised when a compiled extension can’t be import i.e. found

BadPointerError#

class BadPointerError(pointer_value, extra_info)[source]#

Bases: ValueError

Raised when a pointer has a value we know is wrong

PointerArrayConversionError#

class PointerArrayConversionError(array, ptr, expected_array_interface_data)[source]#

Bases: ValueError

Raised when we know a pointer has been incorrectly converted to an array

UnallocatedMemoryError#

class UnallocatedMemoryError(variable_name)[source]#

Bases: ValueError

Raised when we try to allocate memory that has not yet been allocated

We can’t always catch this error, but this is what we raise when we can.

RelativePythonModuleNotFoundError#

class RelativePythonModuleNotFoundError(requesting_python_module, requested, requested_from_python_module)[source]#

Bases: ImportError

Raised when a Python import configured by fgen fails

SolveError#

class SolveError[source]#

Bases: ValueError

Exception raised when an solver can’t solve

For example, because the integration has a runaway effect in it