java.lang.Object
java.lang.Throwable
java.lang.Exception
org.bzdev.net.ServletAdapter.ServletException
- All Implemented Interfaces:
Serializable
- Enclosing interface:
- ServletAdapter
ServletAdapter Exception.
This class is provided to match the servlet specification
In a Servlet implementation, it should be converted to the
exception javax.servlet.ServletException (the name similarity
serves as a reminder and simplifies code migration).
When a servlet catches this exception, the exception should be converted to a ServletException. For example
try { ... } catch (ServeletAdapter.ServletException e) { ServletException se = new ServletException(e.getMessage(), e.getCause()); se.setStackTrace(e.getStackTrace()); throw se; }
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionServletException
(String msg) Constructor given an error message.ServletException
(String msg, Throwable cause) Constructor given an error message and cause.ServletException
(Throwable cause) Constructor given a cause. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ServletException
Constructor given an error message.- Parameters:
msg
- the error message for this exception
-
ServletException
Constructor given an error message and cause.- Parameters:
msg
- the error message for this exceptioncause
- the cause of the exception (typically another exception)
-
ServletException
Constructor given a cause.- Parameters:
cause
- the cause of the exception (typically another exception)
-