error.jsp 1.37 KB
Newer Older
Matt Tucker's avatar
Matt Tucker committed
1 2 3 4 5 6 7 8 9 10 11
<%--
  -	$RCSfile$
  -	$Revision$
  -	$Date$
--%>

<%@ page import="java.io.*,
                 org.jivesoftware.util.ParamUtils,
                 org.jivesoftware.messenger.JiveGlobals,
                 org.jivesoftware.messenger.auth.UnauthorizedException,
                 org.jivesoftware.messenger.user.UserNotFoundException,
Matt Tucker's avatar
Matt Tucker committed
12
                 org.jivesoftware.messenger.group.GroupNotFoundException"
Matt Tucker's avatar
Matt Tucker committed
13 14 15
    isErrorPage="true"
%>

16
<%  boolean debug = "true".equals(JiveGlobals.getProperty("skin.default.debug"));
Matt Tucker's avatar
Matt Tucker committed
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
    if (debug) {
        exception.printStackTrace();
    }
%>

<%  if (exception instanceof UnauthorizedException) { %>

    <p>
    You don't have admin privileges to perform this operation.
    </p>

<%  } else if (exception instanceof UserNotFoundException) {
        String username = ParamUtils.getParameter(request,"username");
%>
        <p>
        The requested user
33 34
        <%  if (username != null) { %>
            (username: <%= username %>)
Matt Tucker's avatar
Matt Tucker committed
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
        <%  } %>
        was not found.
        </p>

<%  } else if (exception instanceof GroupNotFoundException) { %>

    <p>
    The requested group was not found.
    </p>
    
<%  } %>

<%  if (exception != null) {
        StringWriter sout = new StringWriter();
        PrintWriter pout = new PrintWriter(sout);
        exception.printStackTrace(pout);
%>
Matt Tucker's avatar
Matt Tucker committed
52
    Exception:
Bill Lynch's avatar
Bill Lynch committed
53
    <pre>
Matt Tucker's avatar
Matt Tucker committed
54 55 56
<%= sout.toString() %>
    </pre>

Bill Lynch's avatar
Bill Lynch committed
57
<%  } %>