DefaultErrorHandlerpublic class DefaultErrorHandler extends Object implements ErrorHandlerDefault implementation of ErrorHandler interface. |
Methods Summary |
---|
public void | javacError(JavacErrorDetail[] details)
if (details == null) {
return;
}
Object[] args = null;
StringBuffer buf = new StringBuffer();
for (int i=0; i < details.length; i++) {
if (details[i].getJspBeginLineNumber() >= 0) {
args = new Object[] {
new Integer(details[i].getJspBeginLineNumber()),
details[i].getJspFileName() };
buf.append("\n\n");
buf.append(Localizer.getMessage("jsp.error.single.line.number",
args));
buf.append("\n");
buf.append(details[i].getErrorMessage());
buf.append("\n");
buf.append(details[i].getJspExtract());
} else {
args = new Object[] {
new Integer(details[i].getJavaLineNumber()) };
buf.append("\n\n");
buf.append(Localizer.getMessage("jsp.error.java.line.number",
args));
buf.append("\n");
buf.append(details[i].getErrorMessage());
}
}
buf.append("\n\nStacktrace:");
throw new JasperException(
Localizer.getMessage("jsp.error.unable.compile") + ": " + buf);
| public void | javacError(java.lang.String errorReport, java.lang.Exception exception)Processes the given javac error report and exception.
throw new JasperException(
Localizer.getMessage("jsp.error.unable.compile"), exception);
| public void | jspError(java.lang.String fname, int line, int column, java.lang.String errMsg, java.lang.Exception ex)
throw new JasperException(fname + "(" + line + "," + column + ")"
+ " " + errMsg, ex);
| public void | jspError(java.lang.String errMsg, java.lang.Exception ex)
throw new JasperException(errMsg, ex);
|
|