pydrex.exceptions
PyDRex: Custom exceptions (subclasses of
Error
).
1"""> PyDRex: Custom exceptions (subclasses of `pydrex.Error`).""" 2 3# <https://docs.python.org/3.11/tutorial/errors.html#user-defined-exceptions> 4 5 6class Error(Exception): 7 """Base class for exceptions in PyDRex.""" 8 9 10class MissingDependencyError(Error): 11 """Exception raised when optional dependencies are missing. 12 13 Attributes: 14 - message — explanation of the error 15 16 """ 17 18 def __init__(self, message): # pylint: disable=super-init-not-called 19 self.message = message 20 21 22class ConfigError(Error): 23 """Exception raised for errors in the input configuration. 24 25 Attributes: 26 - message — explanation of the error 27 28 """ 29 30 def __init__(self, message): # pylint: disable=super-init-not-called 31 self.message = message 32 33 34class MeshError(Error): 35 """Exception raised for errors in the input mesh. 36 37 Attributes: 38 - message — explanation of the error 39 40 """ 41 42 def __init__(self, message): # pylint: disable=super-init-not-called 43 self.message = message 44 45 46class IterationError(Error): 47 """Exception raised for errors in numerical iteration schemes. 48 49 Attributes: 50 - message — explanation of the error 51 52 """ 53 54 def __init__(self, message): # pylint: disable=super-init-not-called 55 # TODO: Add data attribute? Timestep? 56 self.message = message 57 58 59class SCSVError(Error): 60 """Exception raised for errors in SCSV file I/O. 61 62 Attributes: 63 - message — explanation of the error 64 65 """ 66 67 def __init__(self, message): # pylint: disable=super-init-not-called 68 self.message = message 69 70 71class ModelContextError(Error): 72 """Exception raised for errors in `mesh.Model` context state. 73 74 Attributes: 75 - message — explanation of the error 76 77 """ 78 79 def __init__(self, message): # pylint: disable=super-init-not-called 80 self.message = message
class
Error(builtins.Exception):
Base class for exceptions in PyDRex.
Inherited Members
- builtins.Exception
- Exception
- builtins.BaseException
- with_traceback
- add_note
- args
11class MissingDependencyError(Error): 12 """Exception raised when optional dependencies are missing. 13 14 Attributes: 15 - message — explanation of the error 16 17 """ 18 19 def __init__(self, message): # pylint: disable=super-init-not-called 20 self.message = message
Exception raised when optional dependencies are missing.
Attributes:
- message — explanation of the error
Inherited Members
- builtins.BaseException
- with_traceback
- add_note
- args
23class ConfigError(Error): 24 """Exception raised for errors in the input configuration. 25 26 Attributes: 27 - message — explanation of the error 28 29 """ 30 31 def __init__(self, message): # pylint: disable=super-init-not-called 32 self.message = message
Exception raised for errors in the input configuration.
Attributes:
- message — explanation of the error
Inherited Members
- builtins.BaseException
- with_traceback
- add_note
- args
35class MeshError(Error): 36 """Exception raised for errors in the input mesh. 37 38 Attributes: 39 - message — explanation of the error 40 41 """ 42 43 def __init__(self, message): # pylint: disable=super-init-not-called 44 self.message = message
Exception raised for errors in the input mesh.
Attributes:
- message — explanation of the error
Inherited Members
- builtins.BaseException
- with_traceback
- add_note
- args
47class IterationError(Error): 48 """Exception raised for errors in numerical iteration schemes. 49 50 Attributes: 51 - message — explanation of the error 52 53 """ 54 55 def __init__(self, message): # pylint: disable=super-init-not-called 56 # TODO: Add data attribute? Timestep? 57 self.message = message
Exception raised for errors in numerical iteration schemes.
Attributes:
- message — explanation of the error
Inherited Members
- builtins.BaseException
- with_traceback
- add_note
- args
60class SCSVError(Error): 61 """Exception raised for errors in SCSV file I/O. 62 63 Attributes: 64 - message — explanation of the error 65 66 """ 67 68 def __init__(self, message): # pylint: disable=super-init-not-called 69 self.message = message
Exception raised for errors in SCSV file I/O.
Attributes:
- message — explanation of the error
Inherited Members
- builtins.BaseException
- with_traceback
- add_note
- args
72class ModelContextError(Error): 73 """Exception raised for errors in `mesh.Model` context state. 74 75 Attributes: 76 - message — explanation of the error 77 78 """ 79 80 def __init__(self, message): # pylint: disable=super-init-not-called 81 self.message = message
Exception raised for errors in mesh.Model
context state.
Attributes:
- message — explanation of the error
Inherited Members
- builtins.BaseException
- with_traceback
- add_note
- args