[Rt-commit] rt branch, 4.0/mason-stack-trace-in-error-logs, created. rt-4.0.8-153-gfeda3a8

Thomas Sibley trs at bestpractical.com
Wed Nov 7 17:54:05 EST 2012


The branch, 4.0/mason-stack-trace-in-error-logs has been created
        at  feda3a8ff38f1d80d8386ab1c3cbd3ee6974dcb0 (commit)

- Log -----------------------------------------------------------------
commit feda3a8ff38f1d80d8386ab1c3cbd3ee6974dcb0
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Wed Nov 7 14:45:17 2012 -0800

    Include the Mason stack trace when logging Mason exceptions
    
    The one-line error message provided by ->full_message is fairly useless
    without a stack trace since RT->Logger reports only the location it was
    called from.  Unlike RT's $LogStackTraces option, Mason provides a
    nicely filtered and formatted stack which includes component names.

diff --git a/lib/RT/Interface/Web/Handler.pm b/lib/RT/Interface/Web/Handler.pm
index a740167..052ba5b 100644
--- a/lib/RT/Interface/Web/Handler.pm
+++ b/lib/RT/Interface/Web/Handler.pm
@@ -205,7 +205,7 @@ sub CleanupRequest {
 
 sub HTML::Mason::Exception::as_rt_error {
     my ($self) = @_;
-    $RT::Logger->error( $self->full_message );
+    $RT::Logger->error( $self->as_text );
     return "An internal RT error has occurred.  Your administrator can find more details in RT's log files.";
 }
 

-----------------------------------------------------------------------


More information about the Rt-commit mailing list