EGS Brachy
An egs++ user code for rapid brachytherapy calculations
Loading...
Searching...
No Matches
eb_tests
iaea_errors.py
Go to the documentation of this file.
1
error_messages = {}
2
3
4
new_source_errors = (
5
6
#errors returned in iaea_new_source
7
8
(105,
'Header file not set'
),
9
10
(-1,
'Unable to initialize phase space'
),
11
(-91,
'Failed to get record contents'
),
12
(-93,
'Failed to read header'
),
13
(-94,
'Null file pointer to phase space file'
),
14
(-95,
'Failed to set record for new phase space file'
),
15
(-96,
'Phase space file failed to open'
),
16
(-98,
'Maximumn number of sources exceeded or invalid source id'
),
17
(-99,
'Invalid access mode'
),
18
(-100,
'Path to phase space file is too long'
),
19
(-101,
'Path to phase space file is too short'
)
20
21
)
22
23
error_messages.update(new_source_errors)
24
25
class
IAEAPhaseSpaceSetupError
(Exception):
26
pass
27
28
class
IAEAPhaseSpaceError
(Exception):
29
def
__init__
(self,err_id=None,message=""):
30
if
err_id
is
not
None
:
31
try
:
32
self.
message
= error_messages[err_id]
33
except
KeyError:
34
self.
message
=
"Unknown IAEAPhsp Error %s"
% str(err_id)
35
else
:
36
self.
message
= message
eb_tests.iaea_errors.IAEAPhaseSpaceError
Definition
iaea_errors.py:28
eb_tests.iaea_errors.IAEAPhaseSpaceError.__init__
__init__(self, err_id=None, message="")
Definition
iaea_errors.py:29
eb_tests.iaea_errors.IAEAPhaseSpaceError.message
message
Definition
iaea_errors.py:32
eb_tests.iaea_errors.IAEAPhaseSpaceSetupError
Definition
iaea_errors.py:25
Generated by
1.9.8