Summary: | Should never use Error to report runtime errors | ||
---|---|---|---|
Product: | Batik - Now in Jira | Reporter: | Sebb <sebb> |
Component: | GVT | Assignee: | Batik Developer's Mailing list <batik-dev> |
Status: | NEW --- | ||
Severity: | normal | ||
Priority: | P2 | ||
Version: | 1.7 | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Windows XP |
Description
Sebb
2009-05-08 15:57:11 UTC
(In reply to comment #0) > TIFFImageEncoder uses Error to report unexpected conditions, e.g. Although not very familiar with this, regarding this specific class I'd say there's pending effort into using XML Graphics Commons [1] for the task (this implementation should be abandoned in favor of a more compatible one (see bug 38183 and bug 46513). > Using Error makes it hard to safely catch the exception, as there are some > Errors that should not be caught (e.g. ThreadDeath) [...] > There are over 70 classes where Error is thrown [...] I haven't dig up on this enough but, for what it's worth, I'd vote on this also. :-) [1] http://xmlgraphics.apache.org/commons/#features Thanks, did not know about that project. I've just had a look at the XML Graphics Commons version and that also uses Error with rather cryptic messages, so that part has obviously not been addressed. |