Package org.apache.jasper.compiler
Class ErrorDispatcher
java.lang.Object
org.apache.jasper.compiler.ErrorDispatcher
Class responsible for dispatching JSP parse and javac compilation errors
to the configured error handler.
This class is also responsible for localizing any error codes before they
are passed on to the configured error handler.
In the case of a Java compilation error, the compiler error message is
parsed into an array of JavacErrorDetail instances, which is passed on to
the configured error handler.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final ResourceBundle
private ErrorHandler
private boolean
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic JavacErrorDetail
createJavacError
(String fname, Node.Nodes page, StringBuilder errMsgBuf, int lineNum) private void
void
javacError
(String errorReport, Exception e) void
javacError
(JavacErrorDetail[] javacErrors) void
void
void
void
void
void
void
void
void
void
static JavacErrorDetail[]
parseJavacMessage
(Node.Nodes pageNodes, String errMsg, String fname) void
throwException
(Mark where, JasperException je) Creates and throws a new exception from the given JasperException, by prepending the given location information (containing file name, line number, and column number) to the message of the given exception, and copying the stacktrace of the given exception to the new exception.
-
Field Details
-
bundle
-
errHandler
-
jspcMode
private boolean jspcMode
-
-
Constructor Details
-
ErrorDispatcher
public ErrorDispatcher(boolean jspcMode)
-
-
Method Details
-
jspError
- Throws:
JasperException
-
jspError
- Throws:
JasperException
-
jspError
- Throws:
JasperException
-
jspError
- Throws:
JasperException
-
jspError
- Throws:
JasperException
-
jspError
- Throws:
JasperException
-
jspError
- Throws:
JasperException
-
jspError
- Throws:
JasperException
-
jspError
- Throws:
JasperException
-
jspError
- Throws:
JasperException
-
throwException
Creates and throws a new exception from the given JasperException, by prepending the given location information (containing file name, line number, and column number) to the message of the given exception, and copying the stacktrace of the given exception to the new exception.- Parameters:
where
- The location information (containing file name, line number, and column number) to prependje
- The JasperException to amend- Throws:
JasperException
-
javacError
- Throws:
JasperException
-
javacError
- Throws:
JasperException
-
dispatch
private void dispatch(Mark where, String errCode, Object[] args, Exception e) throws JasperException - Throws:
JasperException
-
parseJavacMessage
public static JavacErrorDetail[] parseJavacMessage(Node.Nodes pageNodes, String errMsg, String fname) throws IOException, JasperException - Throws:
IOException
JasperException
-
createJavacError
public static JavacErrorDetail createJavacError(String fname, Node.Nodes page, StringBuilder errMsgBuf, int lineNum) throws JasperException - Parameters:
fname
-page
-errMsgBuf
-lineNum
-- Returns:
- JavacErrorDetail The error details
- Throws:
JasperException
-