Re: NSMacOSRomanStringEncoding UnsupportedEncodingException
Re: NSMacOSRomanStringEncoding UnsupportedEncodingException
- Subject: Re: NSMacOSRomanStringEncoding UnsupportedEncodingException
- From: Chuck Hill <email@hidden>
- Date: Mon, 17 Nov 2008 14:23:51 -0800
On Nov 17, 2008, at 2:01 PM, Mike Schrag wrote:
In is particular case, what would have been useful is an unchecked
exception that said, "Error instantiating
com.foo.bar.SomeComponent: 'java.io.UnsupportedEncodingException:
NSMacOSRomanStringEncoding'" with the original exception chained.
I don't see the value in a checked exception here, just more
information.
The problem is that the person who wrote the one method up from the
code throwing this exception has no idea that this exception can
even happen, so it's not until someone gets confused by it that you
realize you need to wrap it .... But that's ok, we can all get along
anyway.
What good would a checked exception do here?
UnsupportedEncodingException _is_ a checked exception (IOException
subclass). WOComponentDefinition.readWoDeclaration catches and
converts it into a Runtime. What is needed is a developer smart
enough to throw (or at least log) some context when that happens.
Chuck
--
Chuck Hill Senior Consultant / VP Development
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden