Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??
Thx for the warning(!). Just checked and the 1st 2 lines are:
package Test::Trap; use version; $VERSION = qv('0.1.0');
so hopefully that's all good. :)

Actually, I already came up with this:

# Send trap { $msg->send or $error_msg = "Error: $! $@\n" }; $_ and $error_msg .= ": $_\n" for $trap->die, $trap->stdout, $trap +->stderr; exit_with_error("email_csv_file() failed: $error_msg") if( $error_ +msg );
to try and get everything. Looks ok?

My exit_with_error($msg) sub sends a regular email via Mail::Mailer and prints to the logfile, then cleans up other stuff and and exit(1) etc.
Y, it's a prodn system. No cxn to internet though (and I don't have root), so I have to go through the sysadmin to get extra modules installed like Test::Trap, version.pm etc. Hence the delay in my replies.

Cheers
Chris


In reply to Re^4: Trap the error msg from Mime::Lite by chrism01
in thread Trap the error msg from Mime::Lite by chrism01

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others meditating upon the Monastery: (6)
    As of 2014-10-01 09:37 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      How do you remember the number of days in each month?











      Results (392 votes), past polls