• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Using DataException

 
Alan Morgan
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey,

I was just going through my choices.txt and got to thinking about the DataException.

(see http://www.coderanch.com/t/187210/java-developer-SCJD/certification/Exceptions for discussionm of this).

What I was wondering is do you document it in the methods javadoc ?
I mean because its a runtime exception anyone using the Data layer won't know its there at compile time.
It's not going to make a difference here because the only user is my controller.
But down the line if some other user of the Data layer came along they wouldn't know about the DataException without looking at the code.

Is this overkill or have people been putting this in the javadoc ?

Thanks.
 
Seb Mathe
Ranch Hand
Posts: 225
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you look at Sun's javadoc, most of RuntimeException which can be throwed are documented.

IMO, you should include RuntimeException in your javadoc, in order to let the user of your classes know that such exceptions may occur in some cases.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic