FileDocCategorySizeDatePackage
DefaultErrorHandler.javaAPI DocGlassfish v2 API4586Fri May 04 22:32:52 BST 2007org.apache.jasper.compiler

DefaultErrorHandler

public class DefaultErrorHandler extends Object implements ErrorHandler
Default implementation of ErrorHandler interface.
author
Jan Luehe

Fields Summary
Constructors Summary
Methods Summary
public voidjavacError(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[] {
                        Integer.valueOf(details[i].getJspBeginLineNumber()), 
                        details[i].getJspFileName() };
                buf.append(Localizer.getMessage("jsp.error.single.line.number",
                                                args));
                buf.append("\n"); 
            }

            buf.append(
                Localizer.getMessage("jsp.error.corresponding.servlet"));
            buf.append(details[i].getErrorMessage());
            buf.append("\n\n");
        }

	throw new JasperException(
            Localizer.getMessage("jsp.error.unable.compile") + "\n\n" + buf);
    
public voidjavacError(java.lang.String errorReport, java.lang.Exception exception)
Processes the given javac error report and exception.

param
errorReport Compilation error report
param
exception Compilation exception


 	throw new JasperException(
            Localizer.getMessage("jsp.error.unable.compile"), exception);
    
public voidjspError(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 voidjspError(java.lang.String errMsg, java.lang.Exception ex)

	throw new JasperException(errMsg, ex);