<%@ page import="java.io.PrintWriter, com.imcode.imcms.api.NoPermissionException" isErrorPage="true" %> <% if (null != exception) { %>

There was an error in one of the API sample pages.

<% %>
<%
        if( exception instanceof NoPermissionException ){
            out.println( "You dont have the right permission to do this.");
        } else {
            out.println( "Exception type: " + exception.getClass().getName()  + "
" ); out.println( "Message: " + exception.getMessage() + "
" ); out.println( "Stack trace"); PrintWriter writer = new PrintWriter( out ); exception.printStackTrace( writer ); } %>
<% } else { %>

No error.

<% } %>