• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSMacOSRomanStringEncoding UnsupportedEncodingException
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSMacOSRomanStringEncoding UnsupportedEncodingException


  • Subject: Re: NSMacOSRomanStringEncoding UnsupportedEncodingException
  • From: Chuck Hill <email@hidden>
  • Date: Tue, 18 Nov 2008 12:07:55 -0800


On Nov 18, 2008, at 11:43 AM, Ramsey Lee Gurley wrote:

Okay, so I've tried this twice now, and both bounced immediately. I hope three of these don't show up on the list, but I think the problem must have been how my mobileme System preference automatically set up my email account's reply address. Trying one more time...

On Nov 17, 2008, at 4:20 PM, Mike Schrag wrote:

That's the guy behind the famous "Don’t swallow", right?
This is slightly different, though ... I think everyone's onboard with not swallowing exceptions.


Umm, I'm a little vague on that point personally... I was recently asked not to swallow exceptions when submitting a patch, but frankly... I've heard of it, but I'm not sure what that means. I read the wiki-page on exception handling...

http://wiki.objectstyle.org/confluence/display/WO/Handling+Errors+and+Exceptions**

So... I'm still a little confused :)

try { .... } catch (Exception e) {}

That is swallowing. Don't do it. It just hides errors. OK, there are some rare, er, exceptions to this rule where the exception is expected and useless.


I'm talking about chaining exceptions appropriately. But the problem is that if you only throw RuntimeExceptions, the people below you have no idea what you might throw and therefore have no idea when they need to catch and rethrow, which makes it kind of weird trying to do this effectively with only Runtimes. So my comment about Chuck was that he doesn't agree with CHECKED exceptions.


Reading this thread, am I to understand that "don't swallow" means "always throw" and logging is always unacceptable?

Generally yes. If the exception is expected and can be dealt with or ignored with the process succeeding as normal, then logging is OK. But "this will never throw, so never mind, just bury it" is never, ever acceptable.



If so, what is convention? Do I throw a wrapped exception in a NSForwardException or something similar?

This seems to be the Wonder standard:

try {
...
} catch (Exception ex) {
throw NSForwardException._runtimeExceptionForThrowable(ex);
}


I use a version of this in my code: http://www.javaspecialists.eu/archive/Issue033.html



Inquiring minds...


Swallow, apparently.  :-P

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
References: 
 >NSMacOSRomanStringEncoding UnsupportedEncodingException (From: David Avendasora <email@hidden>)
 >Re: NSMacOSRomanStringEncoding UnsupportedEncodingException (From: Mike Schrag <email@hidden>)
 >Re: NSMacOSRomanStringEncoding UnsupportedEncodingException (From: Pascal Robert <email@hidden>)
 >Re: NSMacOSRomanStringEncoding UnsupportedEncodingException (From: Mike Schrag <email@hidden>)
 >Re: NSMacOSRomanStringEncoding UnsupportedEncodingException (From: Ramsey Lee Gurley <email@hidden>)

  • Prev by Date: Re: NSMacOSRomanStringEncoding UnsupportedEncodingException
  • Next by Date: Re: capistrano deployments w/ wo
  • Previous by thread: Re: NSMacOSRomanStringEncoding UnsupportedEncodingException
  • Next by thread: Re: NSMacOSRomanStringEncoding UnsupportedEncodingException
  • Index(es):
    • Date
    • Thread