Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What is your view on using runtime vs checked exceptions?

 
arulk pillai
Author
Ranch Hand
Posts: 3385
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This book sounds like an interesting read. What is your view on checked vs runtime exceptions?
 
Alaa Nassef
Ranch Hand
Posts: 471
Hibernate Mac OS X Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe Uncle Bob touches that on chapter 7.
 
arulk pillai
Author
Ranch Hand
Posts: 3385
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why is he called uncle Bob?
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by arulk pillai:
Why is he called uncle Bob?


Thats a secret. . .. I don't know either. I believe, because of www.butunclebob.com/
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Adeel Ansari:

I believe, because of www.butunclebob.com/


He has that nickname for much longer than that blog exists...
 
Robert Martin
Author
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by arulk pillai:
This book sounds like an interesting read. What is your view on checked vs runtime exceptions?


Runtime please! PLEASE!!!

Checked exceptions are a failed policy. The addition of an exception at a very low level function causes a massive change to ripple upwards as you add throws clauses to every intermediate function until the catch point.

Lately I have simply been deriving all my exceptions from Error.
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Robert Martin:

Lately I have simply been deriving all my exceptions from Error.


Do you also handle them all like errors? As far as I remember, the semantic of an Error in Java is that you shouldn't even try to recover from it, isn't it?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic