ATLAS Offline Software
Loading...
Searching...
No Matches
ExitCodes.py
Go to the documentation of this file.
1# Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
2
3# File: AthenaCommon/python/ExitCodes.py
4# Author: Wim Lavrijsen (WLavrijsen@lbl.gov)
5
6"""Conventional exit codes, returned to shell."""
7
8
9
10ALL_OK = 0
11
12
13
14BEGIN_RUN_EXCEPTION = 0x10 # not implemented
15BEGIN_RUN_FAILURE = 0x11 # not implemented
16
17INI_ALG_EXCEPTION = 0x20 # no Gaudi support
18INI_ALG_FAILURE = 0x21
19
20REINI_ALG_EXCEPTION = 0x30 # not implemented
21REINI_ALG_FAILURE = 0x31 # not implemented
22
23EXE_ALG_EXCEPTION = 0x40
24EXE_ALG_FAILURE = 0x41
25
26END_RUN_EXCEPTION = 0x50 # not implemented
27END_RUN_FAILURE = 0x51
28
29FIN_ALG_EXCEPTION = 0x60 # no Gaudi support
30FIN_ALG_FAILURE = 0x61
31
32
35
36
37OPTIONS_UNKNOWN = 0x01
38INCLUDE_ERROR = 0x02
39IMPORT_ERROR = 0x03
40DATA_INFILE_ERROR = 0x04 # not implemented
41DATA_OUTFILE_ERROR = 0x05 # not implemented
42HISTO_OUTFILE_ERROR = 0x06 # not implemented
43DATABASE_ERROR = 0x07 # not implemented
44UNKNOWN_EXCEPTION = 0x08
45CONFIGURATION_ERROR = 0x09
46
47
48
49codes = {
50 ALL_OK : "successful run",
51 BEGIN_RUN_EXCEPTION : "exception raised during beginRun()",
52 BEGIN_RUN_FAILURE : "failure in beginRun()",
53 INI_ALG_EXCEPTION : "exception raised during initialization",
54 INI_ALG_FAILURE : "failure in initialization",
55 REINI_ALG_EXCEPTION : "exception raised during an algorithm re-initialization",
56 REINI_ALG_FAILURE : "failure in an algorithm re-initialization",
57 EXE_ALG_EXCEPTION : "exception raised during an algorithm execute",
58 EXE_ALG_FAILURE : "failure in an algorithm execute",
59 END_RUN_EXCEPTION : "exception raised during endRun()",
60 END_RUN_FAILURE : "failure in endRun()",
61 FIN_ALG_EXCEPTION : "exception raised during finalization",
62 FIN_ALG_FAILURE : "failure in finalization",
63 OPTIONS_UNKNOWN : "unknown options supplied",
64 INCLUDE_ERROR : "an error occurred when including a file",
65 IMPORT_ERROR : "an error occurred when importing a file",
66 DATA_INFILE_ERROR : "an error occurred when reading a data file",
67 DATA_OUTFILE_ERROR : "an error occurred when writing a data file",
68 HISTO_OUTFILE_ERROR : "an error occurred when writing a histogram file",
69 DATABASE_ERROR : "a database error occurred",
70 UNKNOWN_EXCEPTION : "an unknown exception occurred"
71}
72
73def what( code ):
74 try:
75 return codes[ code ]
76 except KeyError:
77 return "unknown"