Throwing an Exception : Throw Exceptions « JSP « Java






Throwing an Exception

<html>
    <head>
        <title>Throwing an Exception</title>
    </head>

    <body>
        <title>Throwing an Exception</title>
        <%
        try {
            throw new ArithmeticException("Math Exception!");
        } catch(ArithmeticException e) {
            out.println("Exception message: " + e);
        }
        %>
    </body>
</html>

           
       








Related examples in the same category

1.Throwing Exceptions From Methods