Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Java ADF: throwing JboException without declaration in method header?

413724Oct 20 2006 — edited Oct 26 2006
This is a pure Java question:

Normally when your throw an Exception you need to declare it in the method header.

Example:
public void setTest() throws MyException
{
throw new MyException("throwing my exception");
}
How come your can throw a JboException in an ADF model class method without having to declare it the method header?
Example:
public void setDeptNo(Number value)
{
 if (value != null && value.intValue() < 0)
 {
 throw new JboException("throwing exception without declaring");
 }
 ...
}
Thanks for enlightening my java knowledge.

Fred
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 23 2006
Added on Oct 20 2006
3 comments
483 views