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           Return are four elements: the error string which is used to trigger
28           a "Log::Report" compatible "die()", and the options, reason, and
29           text message.  The options is a HASH which, amongst other things,
30           may contain a stack trace and location.
31
32           Translated components will have exception classes "perl", and "die"
33           or "confess".  On the moment, the "croak" cannot be distiguished
34           from the "confess" (when used in package main) or "die"
35           (otherwise).
36
37           The returned reason depends on whether the translation of the
38           current $! is found in the STRING, and the presence of a stack
39           trace.  The following table is used:
40
41             errstr  stack  =>  reason
42               no      no       ERROR   (die) application internal problem
43               yes     no       FAULT   (die) external problem, think open()
44               no      yes      PANIC   (confess) implementation error
45               yes     yes      ALERT   (confess) external problem, caught
46
47            -Option--Default
48             on_die  'ERROR'
49
50           on_die => REASON
51       exception_decode($exception, %options)
52           [1.23] This function attempts to translate object of other
53           exception frameworks into information to create a
54           Log::Report::Exception.  It returns the same list of parameters as
55           die_decode() does.
56
57           Currently supported:
58
59           ·   DBIx::Class::Exception
60
61           ·   XML::LibXML::Error
62

SEE ALSO

64       This module is part of Log-Report distribution version 1.29, built on
65       November 08, 2019. Website: http://perl.overmeer.net/CPAN/
66

LICENSE

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