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.)
In reply to Re^5: why did i die?
by BrowserUk
in thread why did i die?
by markov
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |