When writing my javadoc for my api, should I put runtime exceptions in there or not? For instance, in the text of the method I say the object must have been started before this method is called. Is it enouogh to make this statement, or should I go ahead and add a @throws IllegalStateException if object is not started, type of thing!?
look into the api, there are lots of places where the method detail has a section called Throws which declares the exceptions that the method might throw, not necessarily at compiletime, and they have also mentioned it in the explanation of the method, for example, this method from the Integer class. I think the best example to emulate would be the API docs, isn't it?
[ October 16, 2005: Message edited by: Akshay Kiran ] [ October 16, 2005: Message edited by: Akshay Kiran ]
"It's not enough that we do our best; sometimes we have to do<br />what's required."<br /> <br />-- Sir Winston Churchill