.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" 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 .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . 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 .\" ======================================================================== .\" .IX Title "Log::Report::Die 3pm" .TH Log::Report::Die 3pm "2023-10-29" "perl v5.36.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's 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 'die' 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(\s-1STRING,\s0 %options)" 4 .el .IP "\fBdie_decode\fR(\s-1STRING,\s0 \f(CW%options\fR)" 4 .IX Item "die_decode(STRING, %options)" The \s-1STRING\s0 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 \s-1HASH\s0 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 \s-1STRING,\s0 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 => \s-1REASON\s0" 2 .IX Item "on_die => REASON" .RE .RS 4 .RE .PD 0 .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)" .PD [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 distribution version 1.36, built on October 27, 2023. Website: \fIhttp://perl.overmeer.net/CPAN/\fR .SH "LICENSE" .IX Header "LICENSE" Copyrights 2007\-2023 by [Mark Overmeer ]. For other contributors see ChangeLog. .PP This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See \fIhttp://dev.perl.org/licenses/\fR