public class ErrorDispatcher extends Object
| Constructor and Description |
|---|
ErrorDispatcher(boolean jspcMode)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static JavacErrorDetail |
createJavacError(String fname,
Node.Nodes page,
StringBuilder errMsgBuf,
int lineNum)
Create a compilation error.
|
static JavacErrorDetail |
createJavacError(String fname,
Node.Nodes page,
StringBuilder errMsgBuf,
int lineNum,
JspCompilationContext ctxt)
Create a compilation error.
|
void |
javacError(JavacErrorDetail[] javacErrors)
Dispatches the given javac compilation errors to the configured error
handler.
|
void |
javacError(String errorReport,
Exception e)
Dispatches the given compilation error report and exception to the
configured error handler.
|
void |
jspError(Exception e)
Dispatches the given parsing exception to the configured error handler.
|
void |
jspError(Exception e,
String errCode,
String... args)
Dispatches the given JSP parse error to the configured error handler.
|
void |
jspError(org.apache.jasper.compiler.Mark where,
Exception e,
String errCode,
String... args)
Dispatches the given JSP parse error to the configured error handler.
|
void |
jspError(org.apache.jasper.compiler.Mark where,
String errCode,
String... args)
Dispatches the given JSP parse error to the configured error handler.
|
void |
jspError(org.apache.jasper.compiler.Node n,
Exception e,
String errCode,
String... args)
Dispatches the given JSP parse error to the configured error handler.
|
void |
jspError(org.apache.jasper.compiler.Node n,
String errCode,
String... args)
Dispatches the given JSP parse error to the configured error handler.
|
void |
jspError(String errCode,
String... args)
Dispatches the given JSP parse error to the configured error handler.
|
static JavacErrorDetail[] |
parseJavacErrors(String errMsg,
String fname,
Node.Nodes page)
Parses the given error message into an array of javac compilation error
messages (one per javac compilation error line number).
|
public ErrorDispatcher(boolean jspcMode)
jspcMode - true if compilation has been initiated by JspC, false
otherwisepublic void jspError(String errCode, String... args) throws JasperException
errCode - Error codeargs - Arguments for parametric replacementJasperException - An error occurredpublic void jspError(org.apache.jasper.compiler.Mark where,
String errCode,
String... args)
throws JasperException
where - Error locationerrCode - Error codeargs - Arguments for parametric replacementJasperException - An error occurredpublic void jspError(org.apache.jasper.compiler.Node n,
String errCode,
String... args)
throws JasperException
n - Node that caused the errorerrCode - Error codeargs - Arguments for parametric replacementJasperException - An error occurredpublic void jspError(Exception e) throws JasperException
e - Parsing exceptionJasperException - An error occurredpublic void jspError(Exception e, String errCode, String... args) throws JasperException
errCode - Error codeargs - Arguments for parametric replacemente - Parsing exceptionJasperException - An error occurredpublic void jspError(org.apache.jasper.compiler.Mark where,
Exception e,
String errCode,
String... args)
throws JasperException
where - Error locatione - Parsing exceptionerrCode - Error codeargs - Arguments for parametric replacementJasperException - An error occurredpublic void jspError(org.apache.jasper.compiler.Node n,
Exception e,
String errCode,
String... args)
throws JasperException
n - Node that caused the errore - Parsing exceptionerrCode - Error codeargs - Arguments for parametric replacementJasperException - An error occurredpublic static JavacErrorDetail[] parseJavacErrors(String errMsg, String fname, Node.Nodes page) throws JasperException, IOException
errMsg - Error messagefname - Name of Java source file whose compilation failedpage - Node representation of JSP page from which the Java source
file was generatedJasperException - An error occurredIOException - IO error which usually should not occurpublic void javacError(JavacErrorDetail[] javacErrors) throws JasperException
javacErrors - Array of javac compilation errorsJasperException - An error occurredpublic void javacError(String errorReport, Exception e) throws JasperException
errorReport - Compilation error reporte - Compilation exceptionJasperException - An error occurredpublic static JavacErrorDetail createJavacError(String fname, Node.Nodes page, StringBuilder errMsgBuf, int lineNum) throws JasperException
fname - The file namepage - The page nodeserrMsgBuf - The error messagelineNum - The source line number of the errorJasperException - An error occurredpublic static JavacErrorDetail createJavacError(String fname, Node.Nodes page, StringBuilder errMsgBuf, int lineNum, JspCompilationContext ctxt) throws JasperException
fname - The file namepage - The page nodeserrMsgBuf - The error messagelineNum - The source line number of the errorctxt - The compilation contextJasperException - An error occurredCopyright © 2000-2021 Apache Software Foundation. All Rights Reserved.