in reply to Re^4: why did i die?
in thread why did i die?
For parser errors and division by zero errors (and friends), I want to flag a more serious error-level than for "expected" errors.
I think you are on a hiding to nothing trying to interpret the meaning of exceptions from unknown code.
For example: What if the code already traps a division by zero error, but then re-throws it (via die) but with some other text that makes sense in the context of that particular module? (Say: "Average calculation failed: zero datapoints supplied." or similar.)
How are you going to classify that? Is it one of your "more serious" errors or an "expected" error?
I really don't think there is any sensible way for a generic logging module to categorise the seriousness of exceptions thrown by unknown code.
And even if there was, I'd suggest that it shouldn't anyway. A logging module should log; not interpret.
(Probably not what you want to hear, but its just an opinion. Then again, I reject the whole Test::* suit of modules primarily because they mess with my output; and thus get between me and my quickest route to solving bugs; all in the name of producing pretty printed garbage statistics.)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^6: why did i die?
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 |