G'day kp2a,
You may find one or more of these to be useful (some you may already know about):
-
The 'refs' stricture of the strict pragma. (The other strictures generate compile-time errors.)
-
Promote warnings to fatal errors.
-
Use eval to trap errors.
-
Use Carp routines to produce more verbose warning and error messages, including stack traces.
-
Use caller to get varying amounts of information from just the caller's package to a complete stack trace.
-
Write $SIG{__WARN__} and $SIG{__DIE__} handlers (see %SIG in perlvar).
-
Take a look at the information provided by the $!, $?, $@ and $^E Error Variables.
-
Use autodie to trap errors from specific functions.
-
CPAN modules such as TryCatch and Try::Tiny. Take a look at their SEE ALSO sections for similar modules.
-
A CPAN search for 'exception' may prove fruitful.
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|