[Bps-public-commit] r14588 - in Prophet/trunk: . lib/Prophet/CLI
sartak at bestpractical.com
sartak at bestpractical.com
Tue Jul 29 10:51:15 EDT 2008
Author: sartak
Date: Tue Jul 29 10:51:13 2008
New Revision: 14588
Modified:
Prophet/trunk/ (props changed)
Prophet/trunk/lib/Prophet/CLI/Command.pm
Prophet/trunk/lib/Prophet/Replica.pm
Log:
r65340 at onn: sartak | 2008-07-29 10:50:57 -0400
Always skip the fatal error functions in stack traces
Modified: Prophet/trunk/lib/Prophet/CLI/Command.pm
==============================================================================
--- Prophet/trunk/lib/Prophet/CLI/Command.pm (original)
+++ Prophet/trunk/lib/Prophet/CLI/Command.pm Tue Jul 29 10:51:13 2008
@@ -15,8 +15,11 @@
sub fatal_error {
my $self = shift;
my $reason = shift;
- die $reason . "\n";
+ # always skip this fatal_error function when generating a stack trace
+ local $Carp::CarpLevel = $Carp::CarpLevel + 1;
+
+ die $reason . "\n";
}
Modified: Prophet/trunk/lib/Prophet/Replica.pm
==============================================================================
--- Prophet/trunk/lib/Prophet/Replica.pm (original)
+++ Prophet/trunk/lib/Prophet/Replica.pm Tue Jul 29 10:51:13 2008
@@ -1021,6 +1021,10 @@
sub log_fatal {
my $self = shift;
+
+ # always skip this fatal_error function when generating a stack trace
+ local $Carp::CarpLevel = $Carp::CarpLevel + 1;
+
$self->log(@_);
Carp::confess(@_);
}
More information about the Bps-public-commit
mailing list