2 General PyAFS utilities, such as error handling
9 class AFSException(Exception):
10 def __init__(self, errno, message):
12 self.strerror = afs_error_message(errno)
13 self.message = message
16 return "AFSException(%s, %s)" % (self.errno, self.message)
19 return "[%s] (%s) while %s" % (self.errno, self.strerror, self.message)
21 def pyafs_error(code, msg):
23 initialize_ACFG_error_table()
24 initialize_KTC_error_table()
25 initialize_PT_error_table()
26 initialize_RXK_error_table()
27 initialize_U_error_table()
32 raise AFSException(code, msg)