Previous Next vertical dots separating previous/next from contents/index/pdf

Handling Control Method Exceptions

The designer of a custom control may choose whether or not to explicitly declare that exceptions are thrown by the control's methods. If a control method is declared to throw exceptions, you must enclose your invocations of that method in a try-catch block.

Even if the designer of the control chooses not to declare exceptions, the support code that implements the control can still throw exceptions. The type of exception thrown is com.bea.control.ControlException.

You should strongly consider handling all control exceptions that may be thrown by the controls you use. If you do not handle the exception, the exception will be passed on to the client of your control. In most cases, the exception is useless to the client and the client does not have the necessary information to diagnose or remedy the problem.

Related Topics

None

 

Skip navigation bar   Back to Top