in reply to Catching perl warnings and errors
Look at Object Oriented Exception Handling in Perl for more clear understanding of how to catch exception and error in Perl.use Error qw(:try); try { some code; code that might thrown an exception; more code; return; } catch Error with { my $ex = shift; # Get hold of the exception object handle the exception; } finally { cleanup code; }; # <-- Remember the semicolon
Updated:
For insert message into Apache log you can use module
Apache::Log or
Sys::Syslog, Net::Syslog for console applications.
-------------------------------- SV* sv_bless(SV* sv, HV* stash);
|
---|