Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I am looking for a convenient and reliable method to customize errors and warnings autogenerated by perl, things like:
use of uninitialized variable in ... undefined subroutine ... called at ... can't use string("") as a HASH ref ...
I just want to be able to customize these messages by prepending a timestamp .. something like this would be ideal
use Error::Customize; $customize = sub { return $makeatimestamp->() . $_[0]; };
I could probably hack this together with __WARN__ and __DIE__ handlers, but I'm sure there's some gotcha's, and someone must have done this before.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: error/warn customization
by wind (Priest) on Feb 14, 2011 at 21:56 UTC | |
|
Re: error/warn customization
by JavaFan (Canon) on Feb 14, 2011 at 20:57 UTC | |
|
Re: error/warn customization
by ELISHEVA (Prior) on Feb 15, 2011 at 10:25 UTC |