While creating any application the developers must be aware with the fact that there are lots of cases where the user may perform wrong inputs and wrong button pressing and such activities. So to create a more user-friendly application its necessary that the developers handle the exception when they are thrown to avoid of making application halted while application is in process. In Echo3 also, a user can throw runtime exceptions. Here is an example of application that throws a RuntimeException as described below.
In the following application we have created a button which will throw a RuntimeException when user presses that button.Here is the full example source code in detail for application.
ExceptionServlet.java
package echo;
|
ExceptionApp.java
package echo;
|


|
Recommend the tutorial |
Ask Questions? Discuss: Throwing Run time exception in Echo3
Post your Comment