randgen team mailing list archive
-
randgen team
-
Mailing list archive
-
Message #00004
[Blueprint perl-carp-backtraces] Use Perl Carp to provide backtraces in case of perl crashes
Blueprint changed by Bernt M Johnsen:
Whiteboard changed:
- If we use carp for warnings and croak for fatal errors (die) we will be
+ ** Moving from warn/die to carp/croak should be done gradually by all
+ developers.
+
+ f we use carp for warnings and croak for fatal errors (die) we will be
able add stack trace with perl -MCarp=verbose (or setting
programmatically e.g. when --debug etc: $Carp::Verbose=1)
Also, I think croak is a good thing instead of returning a status, since it may be caught by writing
eval {
Code with croak/die somewhere
}
if ($@) {
error handling here
} else {
normal handling here
}
Not quite Java exception handling, but better than massive handling av
status variables in the code,
--
Use Perl Carp to provide backtraces in case of perl crashes
https://blueprints.launchpad.net/randgen/+spec/perl-carp-backtraces