.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Required to disable full justification in groff 1.23.0. .if n .ds AD l .\" ======================================================================== .\" .IX Title "Log::Report::Die 3" .TH Log::Report::Die 3 2025-12-12 "perl v5.42.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME Log::Report::Die \- compatibility routines with Perl\*(Aqs die/croak/confess .SH INHERITANCE .IX Header "INHERITANCE" .Vb 2 \& Log::Report::Die \& is an Exporter .Ve .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 1 \& # use internally only .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" This module is used internally, to translate output of \*(Aqdie\*(Aq and Carp functions into Log::Report::Message objects. Also, it tries to convert other kinds of exception frameworks into our message object. .SH FUNCTIONS .IX Header "FUNCTIONS" .ie n .IP "\fBdie_decode\fR(STRING, %options)" 4 .el .IP "\fBdie_decode\fR(STRING, \f(CW%options\fR)" 4 .IX Item "die_decode(STRING, %options)" The \f(CW\*(C`STRING\*(C'\fR is the content of \f(CW$@\fR after an \fBeval()\fR caught a \fBdie()\fR. \&\fBcroak()\fR, or \fBconfess()\fR. This routine tries to convert this into parameters for \fBLog::Report::report()\fR. This is done in a very smart way, even trying to find the stringifications of \f(CW$!\fR. .Sp Returned are four elements: the error string or object which triggered the death originally (the original $@), and the opts, reason, and plain text message. The opts is a HASH which, amongst other things, may contain a stack trace and location extracted from the death text or object. .Sp Translated components will have exception classes \f(CW\*(C`perl\*(C'\fR, and \f(CW\*(C`die\*(C'\fR or \&\f(CW\*(C`confess\*(C'\fR. On the moment, the \f(CW\*(C`croak\*(C'\fR cannot be distiguished from the \&\f(CW\*(C`confess\*(C'\fR (when used in package main) or \f(CW\*(C`die\*(C'\fR (otherwise). .Sp The returned reason depends on whether the translation of the current \&\f(CW$!\fR is found in the \f(CW\*(C`STRING\*(C'\fR, and the presence of a stack trace. The following table is used: .Sp .Vb 5 \& errstr stack => reason \& no no ERROR (die) application internal problem \& yes no FAULT (die) external problem, think open() \& no yes PANIC (confess) implementation error \& yes yes ALERT (confess) external problem, caught \& \& \-Option\-\-Default \& on_die \*(AqERROR\*(Aq .Ve .RS 4 .IP "on_die => REASON" 2 .IX Item "on_die => REASON" .RE .RS 4 .RE .ie n .IP "\fBexception_decode\fR($exception, %options)" 4 .el .IP "\fBexception_decode\fR($exception, \f(CW%options\fR)" 4 .IX Item "exception_decode($exception, %options)" [1.23] This function attempts to translate object of other exception frameworks into information to create a Log::Report::Exception. It returns the same list of parameters as \fBdie_decode()\fR does. .Sp Currently supported: .RS 4 .IP \(bu 4 DBIx::Class::Exception .IP \(bu 4 XML::LibXML::Error .RE .RS 4 .RE .SH "SEE ALSO" .IX Header "SEE ALSO" This module is part of Log\-Report version 1.43, built on December 05, 2025. Website: \fIhttp://perl.overmeer.net/CPAN/\fR .SH LICENSE .IX Header "LICENSE" For contributors see file ChangeLog. .PP This software is copyright (c) 2007\-2025 by Mark Overmeer. .PP This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.