Thread Fehlerbehandlung
(13 answers)
Opened by Schland-Meister at 2012-06-25 14:17
diagnostics übertreibt hier ein bischen:
Code (perl): (dl
)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 use strict; use warnings; use diagnostics; my $m = bless{}, 'main'; # Exception fangen eval{ $m->foo; }; if($@){ print $@ } # Uncaught exception from user code: ... # haha, von wegen uncaught!!! # ohne diagnostics: Can't locate object method "foo" via package "main" # das klingt schon viel besser ;) Edit: Version 5.6.1 Last edited: 2012-06-27 05:57:44 +0200 (CEST) |