Exceptions
All the exceptions that might be raised by the libary come from the
exceptions
module.
oarepo_c4gh.exceptions
This module defines all the exceptions the Crypt4GH library may produce.
Crypt4GHDEKException
Bases: Crypt4GHException
Base exception raised when something goes wrong with Data Encryption Key(s).
Source code in oarepo_c4gh/exceptions.py
__init__(message: str) -> None
Initializes the DEK exception.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
message
|
str
|
a descriptive message about the problem |
required |
Crypt4GHException
Bases: Exception
Basic Crypt4GH exception from which all exceptions must be derived. This exception must not be used directly.
Source code in oarepo_c4gh/exceptions.py
code: str
property
The machine-readable exception code provided as instance exception property for convenience.
__init__(ecode: str, message: str) -> None
Initializes the internal exception code. This is used by derived exceptions to specify the machine-readable exception code.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
ecode
|
str
|
internal machine-readable string identifying the exception |
required |
message
|
str
|
a descriptive message about the problem |
required |
Source code in oarepo_c4gh/exceptions.py
Crypt4GHHeaderException
Bases: Crypt4GHException
An exception related to Crypt4GH header processing problem.
Source code in oarepo_c4gh/exceptions.py
__init__(message: str) -> None
Initializes the header exception.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
message
|
str
|
a descriptive message about the problem |
required |
Crypt4GHHeaderPacketException
Bases: Crypt4GHException
An exception related to particular Crypt4GH header packet processing problem.
Source code in oarepo_c4gh/exceptions.py
__init__(message: str) -> None
Initializes the header packet exception.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
message
|
str
|
a descriptive message about the problem |
required |
Crypt4GHKeyException
Bases: Crypt4GHException
An exception for any problems related to the user-provided cryptographic keys and not the Crypt4GH containers themselves.
Source code in oarepo_c4gh/exceptions.py
__init__(message: str) -> None
Initializes the key exception.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
message
|
str
|
a descriptive message about the problem |
required |
Crypt4GHProcessedException
Bases: Crypt4GHException
An exception for signalling the container cannot be processed again from the beginning.
Source code in oarepo_c4gh/exceptions.py
__init__(message: str) -> None
Initializes the Processed exception.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
message
|
str
|
a decriptive message about the problem |
required |