source: devel/C/errors.py

Last change on this file was 309, checked in by bas, 10 years ago

Checkin the pbs swig development files

File size: 3.3 KB
Line 
1## A useful dict with error codes to text
2# Author: Bas van der Vlies <bas.vandervlies@surfsara.nl>
3#
4# SVN Info:
5#       $Id: errors.py 429 2005-11-04 13:59:06Z bas $
6#
7errors_txt = { 
8        0 : 'no error',
9        15001 :  'Unknown Job Identifier',
10        15002 : 'Undefined Attribute',
11        15003 : 'attempt to set READ ONLY attribute',
12        15004 : 'Invalid request',
13        15005 : 'Unknown batch request',
14        15006 : 'Too many submit retries',
15        15007 : 'No permission',
16        15008 : 'access from host not allowed',
17        15009 : 'job already exists',
18        15010 : 'system error occurred',
19        15011 : 'internal server error occurred',
20        15012 : 'parent job of dependent in rte que',
21        15013 : 'unknown signal name',
22        15014 : 'bad attribute value',
23        15015 : 'Cannot modify attrib in run state',
24        15016 : 'request invalid for job state',
25        15018 : 'Unknown queue name',
26        15019 : 'Invalid Credential in request',
27        15020 : 'Expired Credential in request',
28        15021 : 'Queue not enabled',
29        15022 : 'No access permission for queue',
30        15023 : 'Bad user - no password entry',
31        15024 : 'Max hop count exceeded',
32        15025 : 'Queue already exists',
33        15026 : 'incompatable queue attribute type',
34        15027 : 'Queue Busy (not empty)',
35        15028 : 'Queue name too long',
36        15029 : 'Feature',
37        15030 : 'Cannot enable queue,needs add def',
38        15031 : 'Protocol (ASN.1) error',
39        15032 : 'Bad attribute list structure',
40        15033 : 'No free connections',
41        15034 : 'No server to connect to',
42        15035 : 'Unknown resource',
43        15036 : 'Job exceeds Queue resource limits',
44        15037 : 'No Default Queue Defined',
45        15038 : 'Job Not Rerunnable',
46        15039 : 'Route rejected by all destinations',
47        15040 : 'Time in Route Queue Expired',
48        15041 : 'Request to MOM failed',
49        15042 : '(qsub) cannot access script file',
50        15043 : 'Stage In of files failed',
51        15044 : 'Resources temporarily unavailable',
52        15045 : 'Bad Group specified',
53        15046 : 'Max number of jobs in queue',
54        15047 : 'Checkpoint Busy, may be retries',
55        15048 : 'Limit exceeds allowable',
56        15049 : 'Bad Account attribute value',
57        15050 : 'Job already in exit state',
58        15051 : 'Job files not copied',
59        15052 : 'unknown job id after clean init',
60        15053 : 'No Master in Sync Set',
61        15054 : 'Invalid dependency',
62        15055 : 'Duplicate entry in List',
63        15056 : 'Bad DIS based Request Protocol',
64        15057 : 'cannot execute there',
65        15058 : 'sister rejected',
66        15059 : 'sister could not communicate',
67        15060 : 'req rejected -server shutting down',
68        15061 : 'not all tasks could checkpoint',
69        15062 : 'Named node is not in the list',
70        15063 : 'node-attribute not recognized',
71        15064 : 'Server has no node list',
72        15065 : 'Node name is too big',
73        15066 : 'Node name already exists',
74        15067 : 'Bad node-attribute value',
75        15068 : 'State values are mutually exclusive',
76        15069 : 'Error(s) during global modification of nodes',
77        15070 : 'could not contact Mom',
78        15071 : 'no time-shared nodes',
79        15201 : 'resource unknown',
80        15202 : 'parameter could not be used',
81        15203 : 'a parameter needed did not exist',
82        15204 : "something specified didn't exist",
83        15205 : 'a system error occured',
84        15206 : 'only part of reservation made'
85}
86
87def error():
88  """
89  Check if there is an error, if so fetch the error message string.
90  It says more then a number!
91  """
92  e = get_error()
93  if errors_txt.has_key(e):
94     return (e, errors_txt[e])
95  else:
96     return (e, "Could not find a text for this error, uhhh")
Note: See TracBrowser for help on using the repository browser.