Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Attempt to reload %s aborted gives insufficient information to find underlying issue

by kcott (Archbishop)
on Feb 15, 2017 at 14:53 UTC ( [id://1182065]=note: print w/replies, xml ) Need Help??


in reply to Attempt to reload %s aborted gives insufficient information to find underlying issue

G'day Alex,

You could try the Carp module. In particular, see its "Forcing a Stack Trace" and "Stack Trace formatting" sections.

— Ken

  • Comment on Re: Attempt to reload %s aborted gives insufficient information to find underlying issue

Replies are listed 'Best First'.
Re^2: Attempt to reload %s aborted gives insufficient information to find underlying issue
by amasidlover (Sexton) on Feb 27, 2017 at 16:10 UTC

    Ah, unfortunately what I forgot to put in the original post is what rethrow_exception does...

    sub rethrow_exception { my $exception = shift; # debug that the exception is being rethrow, so we can trace it in + debugs debug( 'Exception ' . ( ref($exception) || 'GENERIC Perl Died: ' . + $exception ) . ' being rethrown', 'true' ); my @trace = caller_string(); # Check if its a string... if ( !ref $exception ) { Zymonic::Exception::from_die->throw( error => 'GENERIC Perl Died: ' . $exception, email => 'sysadmin', zymocallers => \@trace ); } elsif ( ref($exception) !~ /Zymonic::Exception/ ) { Zymonic::Exception::from_die->throw( error => Dumper($exception), email => 'sysadmin', zymocallers => \@trace ); } else { # We have an exception - just rethrow it, adding additional tr +ace to it $exception->{zymocallers} = [ ( ref( $exception->{zymocallers} ) ? @{ $exception->{zymoc +allers} } : () ), @trace ]; $exception->rethrow(); } }

    So effectively we're already doing what Carp can do in terms of stack tracing on the error.

    The other issue with even trying to use Carp is that as far as I can tell Perl doesn't seem to have thrown an error before the attempt to reload fails - and yet the documentation suggests that there should have been an error previously. Since I don't have any evidence of that previous error I'm at a loss to know how to trap it and make Carp (or our own exception handling) give us more information about it...

    But thank you - reading the Carp documentation has given me some other internal perl vars to check.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1182065]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2024-04-19 16:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found