Linux server.nvwebsoft.co.in 3.10.0-1160.114.2.el7.x86_64 #1 SMP Wed Mar 20 15:54:52 UTC 2024 x86_64
Apache
: 162.240.12.249 | : 18.221.221.171
202 Domain
8.1.31
nbspublicschool
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
usr /
local /
share /
man /
man3 /
[ HOME SHELL ]
Name
Size
Permission
Action
App::cpanminus.3pm
14.28
KB
-r--r--r--
App::cpanminus::fatscript.3pm
26.28
KB
-r--r--r--
Bundle::DBD::mysql.3pm
4.09
KB
-r--r--r--
CPAN::Meta::Requirements.3pm
13.78
KB
-r--r--r--
CPAN::Meta::YAML.3pm
5.89
KB
-r--r--r--
Canary::Stability.3pm
5.84
KB
-r--r--r--
DBD::mysql.3pm
48.68
KB
-r--r--r--
DBD::mysql::INSTALL.3pm
30.13
KB
-r--r--r--
Data::Dump.3pm
10.51
KB
-r--r--r--
Data::Dump::Filtered.3pm
10.39
KB
-r--r--r--
Data::Dump::Trace.3pm
9
KB
-r--r--r--
Data::Validate::IP.3pm
15.68
KB
-r--r--r--
Devel::CheckLib.3pm
11.45
KB
-r--r--r--
Digest::MD5.3pm
16.16
KB
-r--r--r--
Error.3pm
21.39
KB
-r--r--r--
Error::Simple.3pm
8.15
KB
-r--r--r--
Expect.3pm
60.58
KB
-r--r--r--
Exporter.3pm
22.74
KB
-r--r--r--
Exporter::Heavy.3pm
4.1
KB
-r--r--r--
File::Copy::Recursive.3pm
18.63
KB
-r--r--r--
File::LckPwdF.3pm
11.21
KB
-r--r--r--
File::Path.3pm
32.74
KB
-r--r--r--
File::ReadBackwards.3pm
10.38
KB
-r--r--r--
File::Temp.3pm
39.49
KB
-r--r--r--
HTML::TagParser.3pm
14.01
KB
-r--r--r--
HTTP::Date.3pm
9.36
KB
-r--r--r--
HTTP::Tiny.3pm
29.24
KB
-r--r--r--
IO::AtomicFile.3pm
7.02
KB
-r--r--r--
IO::InnerFile.3pm
7.66
KB
-r--r--r--
IO::Lines.3pm
5.46
KB
-r--r--r--
IO::Pty.3pm
10.14
KB
-r--r--r--
IO::Scalar.3pm
12.19
KB
-r--r--r--
IO::ScalarArray.3pm
12.04
KB
-r--r--r--
IO::Stringy.3pm
5.72
KB
-r--r--r--
IO::Tty.3pm
9.91
KB
-r--r--r--
IO::Tty::Constant.3pm
11.25
KB
-r--r--r--
IO::Wrap.3pm
12.18
KB
-r--r--r--
IO::WrapTie.3pm
16.4
KB
-r--r--r--
JSON.3pm
64.46
KB
-r--r--r--
JSON::Syck.3pm
9.67
KB
-r--r--r--
JSON::XS.3pm
88.67
KB
-r--r--r--
JSON::XS::Boolean.3pm
4.55
KB
-r--r--r--
JSON::backportPP.3pm
65.09
KB
-r--r--r--
JSON::backportPP::Boolean.3pm
4.52
KB
-r--r--r--
JSON::backportPP::Compat5005.3...
4.39
KB
-r--r--r--
JSON::backportPP::Compat5006.3...
4.39
KB
-r--r--r--
Mail::RFC822::Address.3pm
7.11
KB
-r--r--r--
Mock::Config.3pm
7.73
KB
-r--r--r--
Module::Load.3pm
11.18
KB
-r--r--r--
Module::Load::Conditional.3pm
14.24
KB
-r--r--r--
NetAddr::IP.3pm
38.15
KB
-r--r--r--
NetAddr::IP::InetBase.3pm
14.65
KB
-r--r--r--
NetAddr::IP::Lite.3pm
26.89
KB
-r--r--r--
NetAddr::IP::Util.3pm
23.49
KB
-r--r--r--
NetAddr::IP::UtilPP.3pm
11.04
KB
-r--r--r--
POD2::DE::local::lib.3pm
24.23
KB
-r--r--r--
POD2::PT_BR::local::lib.3pm
24.62
KB
-r--r--r--
Path::Tiny.3pm
52.88
KB
-r--r--r--
Storable.3pm
45.41
KB
-r--r--r--
Template::Toolkit::Simple.3pm
13.37
KB
-r--r--r--
Test2.3pm
11.13
KB
-r--r--r--
Test2::API.3pm
37.22
KB
-r--r--r--
Test2::API::Breakage.3pm
6.63
KB
-r--r--r--
Test2::API::Context.3pm
25.52
KB
-r--r--r--
Test2::API::Instance.3pm
14.72
KB
-r--r--r--
Test2::API::InterceptResult.3p...
22
KB
-r--r--r--
Test2::API::InterceptResult::E...
26.72
KB
-r--r--r--
Test2::API::InterceptResult::H...
4.64
KB
-r--r--r--
Test2::API::InterceptResult::S...
4.77
KB
-r--r--r--
Test2::API::Stack.3pm
8.18
KB
-r--r--r--
Test2::Event.3pm
22.81
KB
-r--r--r--
Test2::Event::Bail.3pm
5.15
KB
-r--r--r--
Test2::Event::Diag.3pm
5.02
KB
-r--r--r--
Test2::Event::Encoding.3pm
5.36
KB
-r--r--r--
Test2::Event::Exception.3pm
5.3
KB
-r--r--r--
Test2::Event::Fail.3pm
4.93
KB
-r--r--r--
Test2::Event::Generic.3pm
9.66
KB
-r--r--r--
Test2::Event::Note.3pm
5.01
KB
-r--r--r--
Test2::Event::Ok.3pm
5.69
KB
-r--r--r--
Test2::Event::Pass.3pm
4.93
KB
-r--r--r--
Test2::Event::Plan.3pm
5.58
KB
-r--r--r--
Test2::Event::Skip.3pm
5.34
KB
-r--r--r--
Test2::Event::Subtest.3pm
5.25
KB
-r--r--r--
Test2::Event::TAP::Version.3pm
5.18
KB
-r--r--r--
Test2::Event::V2.3pm
8.26
KB
-r--r--r--
Test2::Event::Waiting.3pm
4.8
KB
-r--r--r--
Test2::EventFacet.3pm
5.57
KB
-r--r--r--
Test2::EventFacet::About.3pm
6.37
KB
-r--r--r--
Test2::EventFacet::Amnesty.3pm
6.16
KB
-r--r--r--
Test2::EventFacet::Assert.3pm
6.41
KB
-r--r--r--
Test2::EventFacet::Control.3pm
7.4
KB
-r--r--r--
Test2::EventFacet::Error.3pm
6.26
KB
-r--r--r--
Test2::EventFacet::Hub.3pm
7.12
KB
-r--r--r--
Test2::EventFacet::Info.3pm
8.17
KB
-r--r--r--
Test2::EventFacet::Info::Table...
7.16
KB
-r--r--r--
Test2::EventFacet::Meta.3pm
5.22
KB
-r--r--r--
Test2::EventFacet::Parent.3pm
6.31
KB
-r--r--r--
Test2::EventFacet::Plan.3pm
6.67
KB
-r--r--r--
Test2::EventFacet::Render.3pm
6.84
KB
-r--r--r--
Test2::EventFacet::Trace.3pm
12.58
KB
-r--r--r--
Test2::Formatter.3pm
7.9
KB
-r--r--r--
Test2::Formatter::TAP.3pm
6.38
KB
-r--r--r--
Test2::Hub.3pm
18.36
KB
-r--r--r--
Test2::Hub::Interceptor.3pm
4.63
KB
-r--r--r--
Test2::Hub::Interceptor::Termi...
4.67
KB
-r--r--r--
Test2::Hub::Subtest.3pm
5.48
KB
-r--r--r--
Test2::IPC.3pm
5.18
KB
-r--r--r--
Test2::IPC::Driver.3pm
10.51
KB
-r--r--r--
Test2::IPC::Driver::Files.3pm
5.49
KB
-r--r--r--
Test2::Tools::Tiny.3pm
8.45
KB
-r--r--r--
Test2::Transition.3pm
19.71
KB
-r--r--r--
Test2::Util.3pm
9.42
KB
-r--r--r--
Test2::Util::ExternalMeta.3pm
7.22
KB
-r--r--r--
Test2::Util::Facets2Legacy.3pm
9.88
KB
-r--r--r--
Test2::Util::HashBase.3pm
13.91
KB
-r--r--r--
Test2::Util::Trace.3pm
4.74
KB
-r--r--r--
Test::Builder.3pm
28.79
KB
-r--r--r--
Test::Builder::Formatter.3pm
4.85
KB
-r--r--r--
Test::Builder::IO::Scalar.3pm
11.27
KB
-r--r--r--
Test::Builder::Module.3pm
7.35
KB
-r--r--r--
Test::Builder::Tester.3pm
13.04
KB
-r--r--r--
Test::Builder::Tester::Color.3...
4.82
KB
-r--r--r--
Test::Builder::TodoDiag.3pm
4.82
KB
-r--r--r--
Test::Deep.3pm
47.56
KB
-r--r--r--
Test::Deep::NoTest.3pm
4.33
KB
-r--r--r--
Test::Fatal.3pm
10.69
KB
-r--r--r--
Test::File.3pm
23.7
KB
-r--r--r--
Test::More.3pm
43.96
KB
-r--r--r--
Test::Needs.3pm
7.27
KB
-r--r--r--
Test::Requires.3pm
5.93
KB
-r--r--r--
Test::Simple.3pm
10.67
KB
-r--r--r--
Test::Tester.3pm
17.76
KB
-r--r--r--
Test::Tester::Capture.3pm
4.59
KB
-r--r--r--
Test::Tester::CaptureRunner.3p...
4.37
KB
-r--r--r--
Test::Tutorial.3pm
25.46
KB
-r--r--r--
Test::Warnings.3pm
15.7
KB
-r--r--r--
Test::use::ok.3pm
5.52
KB
-r--r--r--
Text::Aligner.3pm
9.77
KB
-r--r--r--
Text::Table.3pm
27.18
KB
-r--r--r--
Time::Local.3pm
15.63
KB
-r--r--r--
Try::Tiny.3pm
22.09
KB
-r--r--r--
URI.3pm
40.31
KB
-r--r--r--
URI::Escape.3pm
9.58
KB
-r--r--r--
URI::Heuristic.3pm
6.84
KB
-r--r--r--
URI::QueryParam.3pm
8.26
KB
-r--r--r--
URI::Split.3pm
5.73
KB
-r--r--r--
URI::URL.3pm
6.19
KB
-r--r--r--
URI::WithBase.3pm
5.91
KB
-r--r--r--
URI::_punycode.3pm
6.32
KB
-r--r--r--
URI::data.3pm
5.98
KB
-r--r--r--
URI::file.3pm
12.16
KB
-r--r--r--
URI::ldap.3pm
7.36
KB
-r--r--r--
YAML::LibYAML.3pm
4.51
KB
-r--r--r--
YAML::Syck.3pm
12.34
KB
-r--r--r--
YAML::XS.3pm
9.57
KB
-r--r--r--
YAML::XS::LibYAML.3pm
3.99
KB
-r--r--r--
lib::core::only.3pm
7.28
KB
-r--r--r--
local::lib.3pm
32.78
KB
-r--r--r--
ok.3pm
4.55
KB
-r--r--r--
version.3pm
15.37
KB
-r--r--r--
version::Internals.3pm
31.34
KB
-r--r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : Error.3pm
.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.28) .\" .\" 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 turned on, 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 .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "Error 3" .TH Error 3 "2023-01-09" "perl v5.16.3" "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" Error \- Error/exception handling in an OO\-ish way .SH "VERSION" .IX Header "VERSION" version 0.17029 .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use Error qw(:try); \& \& throw Error::Simple( "A simple error"); \& \& sub xyz { \& ... \& record Error::Simple("A simple error") \& and return; \& } \& \& unlink($file) or throw Error::Simple("$file: $!",$!); \& \& try { \& do_some_stuff(); \& die "error!" if $condition; \& throw Error::Simple "Oops!" if $other_condition; \& } \& catch Error::IO with { \& my $E = shift; \& print STDERR "File ", $E\->{\*(Aq\-file\*(Aq}, " had a problem\en"; \& } \& except { \& my $E = shift; \& my $general_handler=sub {send_message $E\->{\-description}}; \& return { \& UserException1 => $general_handler, \& UserException2 => $general_handler \& }; \& } \& otherwise { \& print STDERR "Well I don\*(Aqt know what to say\en"; \& } \& finally { \& close_the_garage_door_already(); # Should be reliable \& }; # Don\*(Aqt forget the trailing ; or you might be surprised .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" The \f(CW\*(C`Error\*(C'\fR package provides two interfaces. Firstly \f(CW\*(C`Error\*(C'\fR provides a procedural interface to exception handling. Secondly \f(CW\*(C`Error\*(C'\fR is a base class for errors/exceptions that can either be thrown, for subsequent catch, or can simply be recorded. .PP Errors in the class \f(CW\*(C`Error\*(C'\fR should not be thrown directly, but the user should throw errors from a sub-class of \f(CW\*(C`Error\*(C'\fR. .SH "WARNING" .IX Header "WARNING" Using the \*(L"Error\*(R" module is \fBno longer recommended\fR due to the black-magical nature of its syntactic sugar, which often tends to break. Its maintainers have stopped actively writing code that uses it, and discourage people from doing so. See the \*(L"\s-1SEE ALSO\*(R"\s0 section below for better recommendations. .SH "PROCEDURAL INTERFACE" .IX Header "PROCEDURAL INTERFACE" \&\f(CW\*(C`Error\*(C'\fR exports subroutines to perform exception handling. These will be exported if the \f(CW\*(C`:try\*(C'\fR tag is used in the \f(CW\*(C`use\*(C'\fR line. .IP "try \s-1BLOCK CLAUSES\s0" 4 .IX Item "try BLOCK CLAUSES" \&\f(CW\*(C`try\*(C'\fR is the main subroutine called by the user. All other subroutines exported are clauses to the try subroutine. .Sp The \s-1BLOCK\s0 will be evaluated and, if no error is throw, try will return the result of the block. .Sp \&\f(CW\*(C`CLAUSES\*(C'\fR are the subroutines below, which describe what to do in the event of an error being thrown within \s-1BLOCK.\s0 .IP "catch \s-1CLASS\s0 with \s-1BLOCK\s0" 4 .IX Item "catch CLASS with BLOCK" This clauses will cause all errors that satisfy \f(CW\*(C`$err\->isa(CLASS)\*(C'\fR to be caught and handled by evaluating \f(CW\*(C`BLOCK\*(C'\fR. .Sp \&\f(CW\*(C`BLOCK\*(C'\fR will be passed two arguments. The first will be the error being thrown. The second is a reference to a scalar variable. If this variable is set by the catch block then, on return from the catch block, try will continue processing as if the catch block was never found. The error will also be available in \f(CW$@\fR. .Sp To propagate the error the catch block may call \f(CW\*(C`$err\->throw\*(C'\fR .Sp If the scalar reference by the second argument is not set, and the error is not thrown. Then the current try block will return with the result from the catch block. .IP "except \s-1BLOCK\s0" 4 .IX Item "except BLOCK" When \f(CW\*(C`try\*(C'\fR is looking for a handler, if an except clause is found \&\f(CW\*(C`BLOCK\*(C'\fR is evaluated. The return value from this block should be a \&\s-1HASHREF\s0 or a list of key-value pairs, where the keys are class names and the values are \s-1CODE\s0 references for the handler of errors of that type. .IP "otherwise \s-1BLOCK\s0" 4 .IX Item "otherwise BLOCK" Catch any error by executing the code in \f(CW\*(C`BLOCK\*(C'\fR .Sp When evaluated \f(CW\*(C`BLOCK\*(C'\fR will be passed one argument, which will be the error being processed. The error will also be available in \f(CW$@\fR. .Sp Only one otherwise block may be specified per try block .IP "finally \s-1BLOCK\s0" 4 .IX Item "finally BLOCK" Execute the code in \f(CW\*(C`BLOCK\*(C'\fR either after the code in the try block has successfully completed, or if the try block throws an error then \&\f(CW\*(C`BLOCK\*(C'\fR will be executed after the handler has completed. .Sp If the handler throws an error then the error will be caught, the finally block will be executed and the error will be re-thrown. .Sp Only one finally block may be specified per try block .SH "COMPATIBILITY" .IX Header "COMPATIBILITY" Moose exports a keyword called \f(CW\*(C`with\*(C'\fR which clashes with Error's. This example returns a prototype mismatch error: .PP .Vb 1 \& package MyTest; \& \& use warnings; \& use Moose; \& use Error qw(:try); .Ve .PP (Thanks to \f(CW\*(C`maik.hentsche@amd.com\*(C'\fR for the report.). .SH "CLASS INTERFACE" .IX Header "CLASS INTERFACE" .SS "\s-1CONSTRUCTORS\s0" .IX Subsection "CONSTRUCTORS" The \f(CW\*(C`Error\*(C'\fR object is implemented as a \s-1HASH.\s0 This \s-1HASH\s0 is initialized with the arguments that are passed to it's constructor. The elements that are used by, or are retrievable by the \f(CW\*(C`Error\*(C'\fR class are listed below, other classes may add to these. .PP .Vb 5 \& \-file \& \-line \& \-text \& \-value \& \-object .Ve .PP If \f(CW\*(C`\-file\*(C'\fR or \f(CW\*(C`\-line\*(C'\fR are not specified in the constructor arguments then these will be initialized with the file name and line number where the constructor was called from. .PP If the error is associated with an object then the object should be passed as the \f(CW\*(C`\-object\*(C'\fR argument. This will allow the \f(CW\*(C`Error\*(C'\fR package to associate the error with the object. .PP The \f(CW\*(C`Error\*(C'\fR package remembers the last error created, and also the last error associated with a package. This could either be the last error created by a sub in that package, or the last error which passed an object blessed into that package as the \f(CW\*(C`\-object\*(C'\fR argument. .IP "Error\->\fInew()\fR" 4 .IX Item "Error->new()" See the Error::Simple documentation. .IP "throw ( [ \s-1ARGS \s0] )" 4 .IX Item "throw ( [ ARGS ] )" Create a new \f(CW\*(C`Error\*(C'\fR object and throw an error, which will be caught by a surrounding \f(CW\*(C`try\*(C'\fR block, if there is one. Otherwise it will cause the program to exit. .Sp \&\f(CW\*(C`throw\*(C'\fR may also be called on an existing error to re-throw it. .IP "with ( [ \s-1ARGS \s0] )" 4 .IX Item "with ( [ ARGS ] )" Create a new \f(CW\*(C`Error\*(C'\fR object and returns it. This is defined for syntactic sugar, eg .Sp .Vb 1 \& die with Some::Error ( ... ); .Ve .IP "record ( [ \s-1ARGS \s0] )" 4 .IX Item "record ( [ ARGS ] )" Create a new \f(CW\*(C`Error\*(C'\fR object and returns it. This is defined for syntactic sugar, eg .Sp .Vb 2 \& record Some::Error ( ... ) \& and return; .Ve .SS "\s-1STATIC METHODS\s0" .IX Subsection "STATIC METHODS" .IP "prior ( [ \s-1PACKAGE \s0] )" 4 .IX Item "prior ( [ PACKAGE ] )" Return the last error created, or the last error associated with \&\f(CW\*(C`PACKAGE\*(C'\fR .IP "flush ( [ \s-1PACKAGE \s0] )" 4 .IX Item "flush ( [ PACKAGE ] )" Flush the last error created, or the last error associated with \&\f(CW\*(C`PACKAGE\*(C'\fR.It is necessary to clear the error stack before exiting the package or uncaught errors generated using \f(CW\*(C`record\*(C'\fR will be reported. .Sp .Vb 1 \& $Error\->flush; .Ve .SS "\s-1OBJECT METHODS\s0" .IX Subsection "OBJECT METHODS" .IP "stacktrace" 4 .IX Item "stacktrace" If the variable \f(CW$Error::Debug\fR was non-zero when the error was created, then \f(CW\*(C`stacktrace\*(C'\fR returns a string created by calling \&\f(CW\*(C`Carp::longmess\*(C'\fR. If the variable was zero the \f(CW\*(C`stacktrace\*(C'\fR returns the text of the error appended with the filename and line number of where the error was created, providing the text does not end with a newline. .IP "object" 4 .IX Item "object" The object this error was associated with .IP "file" 4 .IX Item "file" The file where the constructor of this error was called from .IP "line" 4 .IX Item "line" The line where the constructor of this error was called from .IP "text" 4 .IX Item "text" The text of the error .ie n .IP "$err\->associate($obj)" 4 .el .IP "\f(CW$err\fR\->associate($obj)" 4 .IX Item "$err->associate($obj)" Associates an error with an object to allow error propagation. I.e: .Sp .Vb 2 \& $ber\->encode(...) or \& return Error\->prior($ber)\->associate($ldap); .Ve .SS "\s-1OVERLOAD METHODS\s0" .IX Subsection "OVERLOAD METHODS" .IP "stringify" 4 .IX Item "stringify" A method that converts the object into a string. This method may simply return the same as the \f(CW\*(C`text\*(C'\fR method, or it may append more information. For example the file name and line number. .Sp By default this method returns the \f(CW\*(C`\-text\*(C'\fR argument that was passed to the constructor, or the string \f(CW"Died"\fR if none was given. .IP "value" 4 .IX Item "value" A method that will return a value that can be associated with the error. For example if an error was created due to the failure of a system call, then this may return the numeric value of \f(CW$!\fR at the time. .Sp By default this method returns the \f(CW\*(C`\-value\*(C'\fR argument that was passed to the constructor. .SH "PRE-DEFINED ERROR CLASSES" .IX Header "PRE-DEFINED ERROR CLASSES" .SS "Error::Simple" .IX Subsection "Error::Simple" This class can be used to hold simple error strings and values. It's constructor takes two arguments. The first is a text value, the second is a numeric value. These values are what will be returned by the overload methods. .PP If the text value ends with \f(CW\*(C`at file line 1\*(C'\fR as $@ strings do, then this information will be used to set the \f(CW\*(C`\-file\*(C'\fR and \f(CW\*(C`\-line\*(C'\fR arguments of the error object. .PP This class is used internally if an eval'd block die's with an error that is a plain string. (Unless \f(CW$Error::ObjectifyCallback\fR is modified) .ie n .SH "$Error::ObjectifyCallback" .el .SH "\f(CW$Error::ObjectifyCallback\fP" .IX Header "$Error::ObjectifyCallback" This variable holds a reference to a subroutine that converts errors that are plain strings to objects. It is used by Error.pm to convert textual errors to objects, and can be overridden by the user. .PP It accepts a single argument which is a hash reference to named parameters. Currently the only named parameter passed is \f(CW\*(Aqtext\*(Aq\fR which is the text of the error, but others may be available in the future. .PP For example the following code will cause Error.pm to throw objects of the class MyError::Bar by default: .PP .Vb 7 \& sub throw_MyError_Bar \& { \& my $args = shift; \& my $err = MyError::Bar\->new(); \& $err\->{\*(AqMyBarText\*(Aq} = $args\->{\*(Aqtext\*(Aq}; \& return $err; \& } \& \& { \& local $Error::ObjectifyCallback = \e&throw_MyError_Bar; \& \& # Error handling here. \& } .Ve .SH "MESSAGE HANDLERS" .IX Header "MESSAGE HANDLERS" \&\f(CW\*(C`Error\*(C'\fR also provides handlers to extend the output of the \f(CW\*(C`warn()\*(C'\fR perl function, and to handle the printing of a thrown \f(CW\*(C`Error\*(C'\fR that is not caught or otherwise handled. These are not installed by default, but are requested using the \f(CW\*(C`:warndie\*(C'\fR tag in the \f(CW\*(C`use\*(C'\fR line. .PP .Vb 1 \& use Error qw( :warndie ); .Ve .PP These new error handlers are installed in \f(CW$SIG{_\|_WARN_\|_}\fR and \&\f(CW$SIG{_\|_DIE_\|_}\fR. If these handlers are already defined when the tag is imported, the old values are stored, and used during the new code. Thus, to arrange for custom handling of warnings and errors, you will need to perform something like the following: .PP .Vb 5 \& BEGIN { \& $SIG{_\|_WARN_\|_} = sub { \& print STDERR "My special warning handler: $_[0]" \& }; \& } \& \& use Error qw( :warndie ); .Ve .PP Note that setting \f(CW$SIG{_\|_WARN_\|_}\fR after the \f(CW\*(C`:warndie\*(C'\fR tag has been imported will overwrite the handler that \f(CW\*(C`Error\*(C'\fR provides. If this cannot be avoided, then the tag can be explicitly \f(CW\*(C`import\*(C'\fRed later .PP .Vb 1 \& use Error; \& \& $SIG{_\|_WARN_\|_} = ...; \& \& import Error qw( :warndie ); .Ve .SS "\s-1EXAMPLE\s0" .IX Subsection "EXAMPLE" The \f(CW\*(C`_\|_DIE_\|_\*(C'\fR handler turns messages such as .PP .Vb 1 \& Can\*(Aqt call method "foo" on an undefined value at examples/warndie.pl line 16. .Ve .PP into .PP .Vb 1 \& Unhandled perl error caught at toplevel: \& \& Can\*(Aqt call method "foo" on an undefined value \& \& Thrown from: examples/warndie.pl:16 \& \& Full stack trace: \& \& main::inner(\*(Aqundef\*(Aq) called at examples/warndie.pl line 20 \& main::outer(\*(Aqundef\*(Aq) called at examples/warndie.pl line 23 .Ve .SH "SEE ALSO" .IX Header "SEE ALSO" See Exception::Class for a different module providing Object-Oriented exception handling, along with a convenient syntax for declaring hierarchies for them. It doesn't provide Error's syntactic sugar of \f(CW\*(C`try { ... }\*(C'\fR, \&\f(CW\*(C`catch { ... }\*(C'\fR, etc. which may be a good thing or a bad thing based on what you want. (Because Error's syntactic sugar tends to break.) .PP Error::Exception aims to combine Error and Exception::Class \&\*(L"with correct stringification\*(R". .PP TryCatch and Try::Tiny are similar in concept to Error.pm only providing a syntax that hopefully breaks less. .SH "KNOWN BUGS" .IX Header "KNOWN BUGS" None, but that does not mean there are not any. .SH "AUTHORS" .IX Header "AUTHORS" Graham Barr <gbarr@pobox.com> .PP The code that inspired me to write this was originally written by Peter Seibel <peter@weblogic.com> and adapted by Jesse Glick <jglick@sig.bsh.com>. .PP \&\f(CW\*(C`:warndie\*(C'\fR handlers added by Paul Evans <leonerd@leonerd.org.uk> .SH "MAINTAINER" .IX Header "MAINTAINER" Shlomi Fish, <http://www.shlomifish.org/> . .SH "PAST MAINTAINERS" .IX Header "PAST MAINTAINERS" Arun Kumar U <u_arunkumar@yahoo.com> .SH "COPYRIGHT" .IX Header "COPYRIGHT" Copyright (c) 1997\-8 Graham Barr. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. .SH "SUPPORT" .IX Header "SUPPORT" .SS "Websites" .IX Subsection "Websites" The following websites have more information about this module, and may be of help to you. As always, in addition to those websites please use your favorite search engine to discover more resources. .IP "\(bu" 4 MetaCPAN .Sp A modern, open-source \s-1CPAN\s0 search engine, useful to view \s-1POD\s0 in \s-1HTML\s0 format. .Sp <https://metacpan.org/release/Error> .IP "\(bu" 4 Search \s-1CPAN\s0 .Sp The default \s-1CPAN\s0 search engine, useful to view \s-1POD\s0 in \s-1HTML\s0 format. .Sp <http://search.cpan.org/dist/Error> .IP "\(bu" 4 \&\s-1RT: CPAN\s0's Bug Tracker .Sp The \s-1RT \s0( Request Tracker ) website is the default bug/issue tracking system for \s-1CPAN.\s0 .Sp <https://rt.cpan.org/Public/Dist/Display.html?Name=Error> .IP "\(bu" 4 \&\s-1CPAN\s0 Ratings .Sp The \s-1CPAN\s0 Ratings is a website that allows community ratings and reviews of Perl modules. .Sp <http://cpanratings.perl.org/d/Error> .IP "\(bu" 4 \&\s-1CPANTS\s0 .Sp The \s-1CPANTS\s0 is a website that analyzes the Kwalitee ( code metrics ) of a distribution. .Sp <http://cpants.cpanauthors.org/dist/Error> .IP "\(bu" 4 \&\s-1CPAN\s0 Testers .Sp The \s-1CPAN\s0 Testers is a network of smoke testers who run automated tests on uploaded \s-1CPAN\s0 distributions. .Sp <http://www.cpantesters.org/distro/E/Error> .IP "\(bu" 4 \&\s-1CPAN\s0 Testers Matrix .Sp The \s-1CPAN\s0 Testers Matrix is a website that provides a visual overview of the test results for a distribution on various Perls/platforms. .Sp <http://matrix.cpantesters.org/?dist=Error> .IP "\(bu" 4 \&\s-1CPAN\s0 Testers Dependencies .Sp The \s-1CPAN\s0 Testers Dependencies is a website that shows a chart of the test results of all dependencies for a distribution. .Sp <http://deps.cpantesters.org/?module=Error> .SS "Bugs / Feature Requests" .IX Subsection "Bugs / Feature Requests" Please report any bugs or feature requests by email to \f(CW\*(C`bug\-error at rt.cpan.org\*(C'\fR, or through the web interface at <https://rt.cpan.org/Public/Bug/Report.html?Queue=Error>. You will be automatically notified of any progress on the request by the system. .SS "Source Code" .IX Subsection "Source Code" The code is open to the world, and available for you to hack on. Please feel free to browse it and play with it, or whatever. If you want to contribute patches, please send me a diff or prod me to pull from your repository :) .PP <https://github.com/shlomif/perl\-error.pm> .PP .Vb 1 \& git clone git://github.com/shlomif/perl\-error.pm.git .Ve .SH "AUTHOR" .IX Header "AUTHOR" Shlomi Fish ( http://www.shlomifish.org/ ) .SH "BUGS" .IX Header "BUGS" Please report any bugs or feature requests on the bugtracker website <https://github.com/shlomif/perl\-error.pm/issues> .PP When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature. .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" This software is copyright (c) 2020 by Shlomi Fish ( http://www.shlomifish.org/ ). .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.
Close