From: Moritz Bunkus Date: Fri, 4 May 2007 09:27:10 +0000 (+0000) Subject: Leicht anderer Name -- es ist im Endeffekt ein stack backtrace, also soll er auch... X-Git-Tag: release-2.4.3^2~391 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=142f7c2cd402db32f71bef206a6399c62c56bdfa;p=kivitendo-erp.git Leicht anderer Name -- es ist im Endeffekt ein stack backtrace, also soll er auch so benannt werden. --- diff --git a/SL/Form.pm b/SL/Form.pm index 77d8307c3..1c1956241 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -258,7 +258,7 @@ sub hide_form { sub error { $main::lxdebug->enter_sub(); - $main::lxdebug->full_error_call_trace(); + $main::lxdebug->show_backtrace(); my ($self, $msg) = @_; if ($ENV{HTTP_USER_AGENT}) { diff --git a/SL/LXDebug.pm b/SL/LXDebug.pm index f59e61011..76edd8257 100644 --- a/SL/LXDebug.pm +++ b/SL/LXDebug.pm @@ -1,13 +1,13 @@ package LXDebug; -use constant NONE => 0; -use constant INFO => 1; -use constant DEBUG1 => 2; -use constant DEBUG2 => 4; -use constant QUERY => 8; -use constant TRACE => 16; -use constant CALL_TRACE_ON_ERROR => 32; -use constant ALL => 63; +use constant NONE => 0; +use constant INFO => 1; +use constant DEBUG1 => 2; +use constant DEBUG2 => 4; +use constant QUERY => 8; +use constant TRACE => 16; +use constant BACKTRACE_ON_ERROR => 32; +use constant ALL => 63; use constant FILE_TARGET => 0; use constant STDERR_TARGET => 1; @@ -100,15 +100,15 @@ sub leave_sub { return 1; } -sub full_error_call_trace { +sub show_backtrace { my ($self) = @_; - return 1 unless ($global_level & CALL_TRACE_ON_ERROR); + return 1 unless ($global_level & BACKTRACE_ON_ERROR); - $self->message(CALL_TRACE_ON_ERROR, "Starting full caller dump:"); + $self->message(BACKTRACE_ON_ERROR, "Starting full caller dump:"); my $level = 0; while (my ($dummy, $filename, $line, $subroutine) = caller $level) { - $self->message(CALL_TRACE_ON_ERROR, "${subroutine} from ${filename}:${line}"); + $self->message(BACKTRACE_ON_ERROR, "${subroutine} from ${filename}:${line}"); $level++; } diff --git a/lx-erp.conf b/lx-erp.conf index 1bf389580..4255acb84 100644 --- a/lx-erp.conf +++ b/lx-erp.conf @@ -77,7 +77,7 @@ $dbcharset = "ISO-8859-15"; # LXDebug::DEBUG2 # LXDebug::QUERY - SQL Queries # LXDebug::TRACE - Tracing von Funktionsaufrufen -# LXDebug::CALL_TRACE_ON_ERROR - Vollständiger Aufrufpfad, wenn $form->error() aufgerufen wird +# LXDebug::BACKTRACE_ON_ERROR - Vollständiger Aufrufpfad, wenn $form->error() aufgerufen wird # LXDebug::ALL - alle Debugausgaben # # Beipiel: