in reply to Re^3: why did i die?
in thread why did i die?
I tried to keep the question easy, simply stating that it should be a generic solution. The application is more complex (of course).
Log::Report is a powerful logging/exception/translation framework. It provides functions like error(), trace() and alert(), and puts them to syslog, log files, log4perl, etc. It also provides a try(). Now, the try (=eval) can catch an Log::Report::Exception object, but also texts produced by dies and croaks originating from modules which have not been implemented via the Log::Report framework. I have no control over the error message produced in CPAN modules.
Now, the try() attempts to translate these error texts into exception objects. When this exception is send to syslog (or log4perl, or ...) I want to be able to send it with the right error level. For parser errors and division by zero errors (and friends), I want to flag a more serious error-level than for "expected" errors.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: why did i die?
by BrowserUk (Patriarch) on Apr 02, 2014 at 10:39 UTC | |
by markov (Scribe) on Apr 02, 2014 at 10:55 UTC | |
by BrowserUk (Patriarch) on Apr 02, 2014 at 11:34 UTC | |
by markov (Scribe) on Apr 02, 2014 at 12:55 UTC |