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
77 78 79 80 81 82 83 84 85 86 87 88 89 90 |
|
__init__(message: str) -> None
Initializes the DEK exception.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
message
|
str
|
a descriptive message about the problem |
required |
Source code in oarepo_c4gh/exceptions.py
83 84 85 86 87 88 89 90 |
|
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
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
|
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
13 14 15 16 17 18 19 20 21 22 23 24 |
|
Crypt4GHHeaderException
Bases: Crypt4GHException
An exception related to Crypt4GH header processing problem.
Source code in oarepo_c4gh/exceptions.py
50 51 52 53 54 55 56 57 58 59 |
|
__init__(message: str) -> None
Initializes the header exception.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
message
|
str
|
a descriptive message about the problem |
required |
Source code in oarepo_c4gh/exceptions.py
53 54 55 56 57 58 59 |
|
Crypt4GHHeaderPacketException
Bases: Crypt4GHException
An exception related to particular Crypt4GH header packet processing problem.
Source code in oarepo_c4gh/exceptions.py
62 63 64 65 66 67 68 69 70 71 72 73 74 |
|
__init__(message: str) -> None
Initializes the header packet exception.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
message
|
str
|
a descriptive message about the problem |
required |
Source code in oarepo_c4gh/exceptions.py
68 69 70 71 72 73 74 |
|
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
35 36 37 38 39 40 41 42 43 44 45 46 47 |
|
__init__(message: str) -> None
Initializes the key exception.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
message
|
str
|
a descriptive message about the problem |
required |
Source code in oarepo_c4gh/exceptions.py
41 42 43 44 45 46 47 |
|
Crypt4GHProcessedException
Bases: Crypt4GHException
An exception for signalling the container cannot be processed again from the beginning.
Source code in oarepo_c4gh/exceptions.py
93 94 95 96 97 98 99 100 101 102 103 104 105 106 |
|
__init__(message: str) -> None
Initializes the Processed exception.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
message
|
str
|
a decriptive message about the problem |
required |
Source code in oarepo_c4gh/exceptions.py
99 100 101 102 103 104 105 106 |
|