Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Errors Using Hashes and Subroutines

by nardo (Friar)
on Apr 17, 2001 at 23:22 UTC ( [id://73305]=note: print w/replies, xml ) Need Help??


in reply to Errors Using Hashes and Subroutines

ERROR_BADCONFIG is a reference. The following printError fixes your problem

sub printError { my $errortext = shift; my $errorhashref = shift; print "$errorhashref->{ 'Type' } Error Detected\n", "$errorhashref->{ 'Description' }\n", "Error Details: $errortext\n"; if ( $errorhashref->{ "Fatal" } ) { die "Fatal Error Detected" }; }
Also, when you are including errors such as "Reference found where even-sized list expected at errors.cgi line 42" it is often useful to mention what line 42 is.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://73305]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2024-04-23 18:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found