• Post Reply Bookmark Topic Watch Topic
  • New Topic

Exceptions

 
Kirk Pepperdine
Author
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, same set of slides but it's now moved on to exceptions. The suggestion is that
try {
...
} catch (ExceptionA a) {
...
} catch (ExceptionB b) {
...
} catch (Exception e) {
...
}

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

This one seems a bit counter intuative to me. It would be very interesting to hear peoples thoughts on this one.
 
Peter den Haan
author
Ranch Hand
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't think that's true. But it will certainly outperform

Maybe that was the point?
- Peter
 
Kirk Pepperdine
Author
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are right. I went back an looked at the document and realized my mistake.
BTW, the performance difference was almost not worth considering though I'm not sure why you'd want to use such a structure.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!