File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Agile and Other Processes and the fly likes What is your view on using runtime vs checked exceptions? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Agile and Other Processes
Bookmark "What is your view on using runtime vs checked exceptions?" Watch "What is your view on using runtime vs checked exceptions?" New topic
Author

What is your view on using runtime vs checked exceptions?

arulk pillai
Author
Ranch Hand

Joined: May 31, 2007
Posts: 3216
This book sounds like an interesting read. What is your view on checked vs runtime exceptions?


Java Interview Questions and Answers Blog | Amazon.com profile | Java Interview Books
Alaa Nassef
Ranch Hand

Joined: Jan 28, 2008
Posts: 460
I believe Uncle Bob touches that on chapter 7.


Visit my blog: http://jnassef.blogspot.com/
arulk pillai
Author
Ranch Hand

Joined: May 31, 2007
Posts: 3216
Why is he called uncle Bob?
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
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

Joined: Jul 11, 2001
Posts: 14112
Originally posted by Adeel Ansari:

I believe, because of www.butunclebob.com/


He has that nickname for much longer than that blog exists...


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Robert Martin
Author
Ranch Hand

Joined: Jul 02, 2003
Posts: 76
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.


---<br />Uncle Bob.
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
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?
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: What is your view on using runtime vs checked exceptions?
 
Similar Threads
checked vs unchecked exceptions
checked vs unchecked exceptions
Unchecked vs Checked Exception
Compile Time Errors Vs Runtime Errors
compile time vs runtime error???