HTML5 Canvas
Written by: Simon Sarris
Featured Refcardz: Top Refcardz:
  1. Apache Hadoop
  2. Web Driver
  3. MVVM
  4. REST
  5. ADO.NET
  1. HTML5
  2. Ajax
  3. jQuery Selectors
  4. CSS Part 1
  5. Git

Link Details

Link 30462 thumbnail
User 111696 avatar

By bloid
via members.capmac.org
Published: Jul 16 2007 / 12:07

I'm not an exception hater, but I do dislike the way Java makes you deal with multiple exception types. Take something trivial like reflection:
  • 14
  • 2
  • 1978
  • 1

Comments

Add your comment
User 179375 avatar

Ricky Clarkson replied ago:

0 votes Vote down Vote up Reply

I prefer catch (OneException | AnotherException e).

User 235715 avatar

crowlogic replied ago:

0 votes Vote down Vote up Reply

thats ridiculous because we are specifying a list of things to catch, not a boolean expression

User 179375 avatar

Ricky Clarkson replied ago:

0 votes Vote down Vote up Reply

Well, (IOException,SQLException exception) is a possibility, but I think it's too similar to ordinary parameter lists, so it would be easily confused.

Reusing the | operator with types isn't so easy to confuse with anything that already exists - that's why I suggested that.

User 205382 avatar

hightower replied ago:

0 votes Vote down Vote up Reply

I prefer catch too.

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.