Apache Tomcat 6.0.53

org.apache.jasper.compiler
Class ErrorDispatcher

java.lang.Object
  extended by org.apache.jasper.compiler.ErrorDispatcher

public class ErrorDispatcher
extends java.lang.Object

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.

Author:
Jan Luehe, Kin-man Chung

Constructor Summary
ErrorDispatcher(boolean jspcMode)
           
 
Method Summary
static JavacErrorDetail createJavacError(java.lang.String fname, Node.Nodes page, java.lang.StringBuffer errMsgBuf, int lineNum)
           
static JavacErrorDetail createJavacError(java.lang.String fname, Node.Nodes page, java.lang.StringBuffer errMsgBuf, int lineNum, JspCompilationContext ctxt)
           
 void javacError(JavacErrorDetail[] javacErrors)
           
 void javacError(java.lang.String errorReport, java.lang.Exception e)
           
 void jspError(java.lang.Exception e)
           
 void jspError(org.apache.jasper.compiler.Mark where, java.lang.String errCode)
           
 void jspError(org.apache.jasper.compiler.Mark where, java.lang.String errCode, java.lang.String arg)
           
 void jspError(org.apache.jasper.compiler.Mark where, java.lang.String errCode, java.lang.String arg1, java.lang.String arg2)
           
 void jspError(org.apache.jasper.compiler.Mark where, java.lang.String errCode, java.lang.String arg1, java.lang.String arg2, java.lang.String arg3)
           
 void jspError(org.apache.jasper.compiler.Node n, java.lang.String errCode)
           
 void jspError(org.apache.jasper.compiler.Node n, java.lang.String errCode, java.lang.String arg)
           
 void jspError(org.apache.jasper.compiler.Node n, java.lang.String errCode, java.lang.String arg, java.lang.Exception e)
           
 void jspError(org.apache.jasper.compiler.Node n, java.lang.String errCode, java.lang.String arg1, java.lang.String arg2)
           
 void jspError(org.apache.jasper.compiler.Node n, java.lang.String errCode, java.lang.String arg1, java.lang.String arg2, java.lang.String arg3)
           
 void jspError(java.lang.String errCode)
           
 void jspError(java.lang.String errCode, java.lang.String arg)
           
 void jspError(java.lang.String errCode, java.lang.String arg, java.lang.Exception e)
           
 void jspError(java.lang.String errCode, java.lang.String arg1, java.lang.String arg2)
           
 void jspError(java.lang.String errCode, java.lang.String arg1, java.lang.String arg2, java.lang.String arg3)
           
static JavacErrorDetail[] parseJavacErrors(java.lang.String errMsg, java.lang.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).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ErrorDispatcher

public ErrorDispatcher(boolean jspcMode)
Method Detail

jspError

public void jspError(java.lang.String errCode)
              throws JasperException
Throws:
JasperException

jspError

public void jspError(org.apache.jasper.compiler.Mark where,
                     java.lang.String errCode)
              throws JasperException
Throws:
JasperException

jspError

public void jspError(org.apache.jasper.compiler.Node n,
                     java.lang.String errCode)
              throws JasperException
Throws:
JasperException

jspError

public void jspError(java.lang.String errCode,
                     java.lang.String arg)
              throws JasperException
Throws:
JasperException

jspError

public void jspError(org.apache.jasper.compiler.Mark where,
                     java.lang.String errCode,
                     java.lang.String arg)
              throws JasperException
Throws:
JasperException

jspError

public void jspError(org.apache.jasper.compiler.Node n,
                     java.lang.String errCode,
                     java.lang.String arg)
              throws JasperException
Throws:
JasperException

jspError

public void jspError(java.lang.String errCode,
                     java.lang.String arg1,
                     java.lang.String arg2)
              throws JasperException
Throws:
JasperException

jspError

public void jspError(java.lang.String errCode,
                     java.lang.String arg1,
                     java.lang.String arg2,
                     java.lang.String arg3)
              throws JasperException
Throws:
JasperException

jspError

public void jspError(org.apache.jasper.compiler.Mark where,
                     java.lang.String errCode,
                     java.lang.String arg1,
                     java.lang.String arg2)
              throws JasperException
Throws:
JasperException

jspError

public void jspError(org.apache.jasper.compiler.Mark where,
                     java.lang.String errCode,
                     java.lang.String arg1,
                     java.lang.String arg2,
                     java.lang.String arg3)
              throws JasperException
Throws:
JasperException

jspError

public void jspError(org.apache.jasper.compiler.Node n,
                     java.lang.String errCode,
                     java.lang.String arg1,
                     java.lang.String arg2)
              throws JasperException
Throws:
JasperException

jspError

public void jspError(org.apache.jasper.compiler.Node n,
                     java.lang.String errCode,
                     java.lang.String arg1,
                     java.lang.String arg2,
                     java.lang.String arg3)
              throws JasperException
Throws:
JasperException

jspError

public void jspError(java.lang.Exception e)
              throws JasperException
Throws:
JasperException

jspError

public void jspError(java.lang.String errCode,
                     java.lang.String arg,
                     java.lang.Exception e)
              throws JasperException
Throws:
JasperException

jspError

public void jspError(org.apache.jasper.compiler.Node n,
                     java.lang.String errCode,
                     java.lang.String arg,
                     java.lang.Exception e)
              throws JasperException
Throws:
JasperException

parseJavacErrors

public static JavacErrorDetail[] parseJavacErrors(java.lang.String errMsg,
                                                  java.lang.String fname,
                                                  Node.Nodes page)
                                           throws JasperException,
                                                  java.io.IOException
Parses the given error message into an array of javac compilation error messages (one per javac compilation error line number).

Parameters:
errMsg - Error message
fname - Name of Java source file whose compilation failed
page - Node representation of JSP page from which the Java source file was generated
Returns:
Array of javac compilation errors, or null if the given error message does not contain any compilation error line numbers
Throws:
JasperException
java.io.IOException

javacError

public void javacError(JavacErrorDetail[] javacErrors)
                throws JasperException
Throws:
JasperException

javacError

public void javacError(java.lang.String errorReport,
                       java.lang.Exception e)
                throws JasperException
Throws:
JasperException

createJavacError

public static JavacErrorDetail createJavacError(java.lang.String fname,
                                                Node.Nodes page,
                                                java.lang.StringBuffer errMsgBuf,
                                                int lineNum)
                                         throws JasperException
Parameters:
fname -
page -
errMsgBuf -
lineNum -
Returns:
JavacErrorDetail The error details
Throws:
JasperException

createJavacError

public static JavacErrorDetail createJavacError(java.lang.String fname,
                                                Node.Nodes page,
                                                java.lang.StringBuffer errMsgBuf,
                                                int lineNum,
                                                JspCompilationContext ctxt)
                                         throws JasperException
Parameters:
fname -
page -
errMsgBuf -
lineNum -
ctxt -
Returns:
JavacErrorDetail The error details
Throws:
JasperException

Apache Tomcat 6.0.53

Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.