Changeset 1513 for pykota/trunk/bin
- Timestamp:
- 06/02/04 16:25:07 (20 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/bin/cupspykota
r1503 r1513 24 24 # 25 25 # $Log$ 26 # Revision 1.55 2004/06/02 14:25:07 jalet 27 # Should correctly capture ALL errors now 28 # 26 29 # Revision 1.54 2004/05/26 16:44:48 jalet 27 30 # Now logs something when client hostname can't be extracted … … 656 659 kotabackend = PyKotaBackend() 657 660 retcode = kotabackend.mainWork() 658 except (PyKotaToolError, PyKotaConfigError, PyKotaStorageError, PyKotaAccounterError, AttributeError, KeyError, IndexError, ValueError, TypeError, IOError), msg:661 except : 659 662 import traceback 660 mm = [((f.endswith('\n') and f) or (f + '\n')) for f in traceback.format_exception(*sys.exc_info())] 661 sys.stderr.write("ERROR : cupspykota backend failed (%s)\n%s" % (msg, "ERROR : ".join(mm))) 663 lines = [] 664 for line in traceback.format_exception(*sys.exc_info()) : 665 lines.extend([l for l in line.split("\n") if l]) 666 sys.stderr.write("ERROR : cupspykota backend failed : \n%s" % (msg, "ERROR : ".join(["%s\n" % l for l in lines]))) 662 667 sys.stderr.flush() 663 668 retcode = 1