0.1.8
Loading...
Searching...
No Matches
pyhelios.exceptions Namespace Reference

Classes

class  HeliosError
 Exception classes for PyHelios library. More...
 
class  HeliosFileIOError
 File I/O related errors. More...
 
class  HeliosGPUInitializationError
 GPU initialization errors. More...
 
class  HeliosInvalidArgumentError
 Invalid argument errors. More...
 
class  HeliosMemoryAllocationError
 Memory allocation errors. More...
 
class  HeliosPluginNotAvailableError
 Plugin not available errors. More...
 
class  HeliosRuntimeError
 Runtime errors from Helios operations. More...
 
class  HeliosUnknownError
 Unknown errors. More...
 
class  HeliosUUIDNotFoundError
 UUID not found errors. More...
 

Functions

 create_exception_from_error_code (error_code, error_message)
 Create an appropriate exception instance from an error code and message.
 
 check_helios_error (get_error_func, get_message_func)
 Check for Helios errors and raise appropriate Python exceptions.
 

Variables

dict ERROR_CODE_TO_EXCEPTION
 

Function Documentation

◆ check_helios_error()

pyhelios.exceptions.check_helios_error ( get_error_func,
get_message_func )

Check for Helios errors and raise appropriate Python exceptions.

This function is designed to be used as an errcheck callback for ctypes function calls.

Parameters
get_error_funcFunction to get the last error code
get_message_funcFunction to get the last error message
Exceptions
HeliosErrorIf an error is detected

Definition at line 135 of file exceptions.py.

◆ create_exception_from_error_code()

pyhelios.exceptions.create_exception_from_error_code ( error_code,
error_message )

Create an appropriate exception instance from an error code and message.

Parameters
error_codeError code from the C++ wrapper
error_messageError message from the C++ wrapper
Returns
HeliosError Appropriate exception instance

Definition at line 117 of file exceptions.py.

Variable Documentation

◆ ERROR_CODE_TO_EXCEPTION

dict pyhelios.exceptions.ERROR_CODE_TO_EXCEPTION
Initial value:
1= {
2 1: HeliosInvalidArgumentError, # PYHELIOS_ERROR_INVALID_PARAMETER
3 2: HeliosUUIDNotFoundError, # PYHELIOS_ERROR_UUID_NOT_FOUND
4 3: HeliosFileIOError, # PYHELIOS_ERROR_FILE_IO
5 4: HeliosMemoryAllocationError, # PYHELIOS_ERROR_MEMORY_ALLOCATION
6 5: HeliosGPUInitializationError, # PYHELIOS_ERROR_GPU_INITIALIZATION
7 6: HeliosPluginNotAvailableError, # PYHELIOS_ERROR_PLUGIN_NOT_AVAILABLE
8 7: HeliosRuntimeError, # PYHELIOS_ERROR_RUNTIME
9 99: HeliosUnknownError, # PYHELIOS_ERROR_UNKNOWN
10}

Definition at line 95 of file exceptions.py.