mehrere Exception abfangen
Verfasst: Freitag 12. Dezember 2008, 16:50
Hallo,
gibt es eine bessere Möglichkeit als diese?
mfg
Twilo
gibt es eine bessere Möglichkeit als diese?
Code: Alles auswählen
try:
xyz()
sys.exit(0)
except ExceptionA, e:
a.b(e)
sys.exit(1)
except ExceptionB, e:
a.b(e)
sys.exit(1)
except ExceptionC, e:
a.b(e)
sys.exit(1)
except ExceptionD, e:
a.b(e)
sys.exit(1)
[...]
Twilo