1Log::Report::Die(3)   User Contributed Perl Documentation  Log::Report::Die(3)
2
3
4

NAME

6       Log::Report::Die - compatibility routines with Perl's die/croak/confess
7

INHERITANCE

9        Log::Report::Die
10          is a Exporter
11

SYNOPSIS

13        # use internally only
14

DESCRIPTION

16       This module is used internally, to translate output of 'die' and Carp
17       functions into Log::Report::Message objects.  Also, it tries to convert
18       other kinds of exception frameworks into our message object.
19

FUNCTIONS

21       die_decode(STRING, %options)
22           The STRING is the content of $@ after an eval() caught a die().
23           croak(), or confess().  This routine tries to convert this into
24           parameters for Log::Report::report().  This is done in a very smart
25           way, even trying to find the stringifications of $!.
26
27           Returned are four elements: the error string or object which
28           triggered the death originally (the original $@), and the opts,
29           reason, and plain text message.  The opts is a HASH which, amongst
30           other things, may contain a stack trace and location extracted from
31           the death text or object.
32
33           Translated components will have exception classes "perl", and "die"
34           or "confess".  On the moment, the "croak" cannot be distiguished
35           from the "confess" (when used in package main) or "die"
36           (otherwise).
37
38           The returned reason depends on whether the translation of the
39           current $! is found in the STRING, and the presence of a stack
40           trace.  The following table is used:
41
42             errstr  stack  =>  reason
43               no      no       ERROR   (die) application internal problem
44               yes     no       FAULT   (die) external problem, think open()
45               no      yes      PANIC   (confess) implementation error
46               yes     yes      ALERT   (confess) external problem, caught
47
48            -Option--Default
49             on_die  'ERROR'
50
51           on_die => REASON
52       exception_decode($exception, %options)
53           [1.23] This function attempts to translate object of other
54           exception frameworks into information to create a
55           Log::Report::Exception.  It returns the same list of parameters as
56           die_decode() does.
57
58           Currently supported:
59
60           •   DBIx::Class::Exception
61
62           •   XML::LibXML::Error
63

SEE ALSO

65       This module is part of Log-Report distribution version 1.33, built on
66       July 17, 2021. Website: http://perl.overmeer.net/CPAN/
67

LICENSE

69       Copyrights 2007-2021 by [Mark Overmeer <markov@cpan.org>]. For other
70       contributors see ChangeLog.
71
72       This program is free software; you can redistribute it and/or modify it
73       under the same terms as Perl itself.  See http://dev.perl.org/licenses/
74
75
76
77perl v5.34.0                      2021-07-22               Log::Report::Die(3)
Impressum