org.apache.jasper.compiler
类 ErrorDispatcher

java.lang.Object
  继承者 org.apache.jasper.compiler.ErrorDispatcher

public class ErrorDispatcher
extends 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.

作者:
Jan Luehe, Kin-man Chung

构造方法摘要
ErrorDispatcher(boolean jspcMode)
           
 
方法摘要
static JavacErrorDetail createJavacError(String fname, Node.Nodes page, StringBuilder errMsgBuf, int lineNum)
           
 void javacError(JavacErrorDetail[] javacErrors)
           
 void javacError(String errorReport, Exception e)
           
 void jspError(Exception e)
           
 void jspError(org.apache.jasper.compiler.Mark where, Exception e)
           
 void jspError(org.apache.jasper.compiler.Mark where, String errCode)
           
 void jspError(org.apache.jasper.compiler.Mark where, String errCode, String... args)
           
 void jspError(org.apache.jasper.compiler.Node n, String errCode)
           
 void jspError(org.apache.jasper.compiler.Node n, String errCode, String... args)
           
 void jspError(org.apache.jasper.compiler.Node n, String errCode, String arg, Exception e)
           
 void jspError(String errCode)
           
 void jspError(String errCode, String... args)
           
 void jspError(String errCode, String arg, Exception e)
           
static JavacErrorDetail[] parseJavacMessage(Node.Nodes pageNodes, String errMsg, String fname)
           
 void throwException(org.apache.jasper.compiler.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.
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

ErrorDispatcher

public ErrorDispatcher(boolean jspcMode)
方法详细信息

jspError

public void jspError(String errCode)
              throws JasperException
抛出:
JasperException

jspError

public void jspError(org.apache.jasper.compiler.Mark where,
                     String errCode)
              throws JasperException
抛出:
JasperException

jspError

public void jspError(org.apache.jasper.compiler.Mark where,
                     Exception e)
              throws JasperException
抛出:
JasperException

jspError

public void jspError(org.apache.jasper.compiler.Node n,
                     String errCode)
              throws JasperException
抛出:
JasperException

jspError

public void jspError(String errCode,
                     String... args)
              throws JasperException
抛出:
JasperException

jspError

public void jspError(org.apache.jasper.compiler.Mark where,
                     String errCode,
                     String... args)
              throws JasperException
抛出:
JasperException

jspError

public void jspError(org.apache.jasper.compiler.Node n,
                     String errCode,
                     String... args)
              throws JasperException
抛出:
JasperException

jspError

public void jspError(Exception e)
              throws JasperException
抛出:
JasperException

jspError

public void jspError(String errCode,
                     String arg,
                     Exception e)
              throws JasperException
抛出:
JasperException

jspError

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

throwException

public void throwException(org.apache.jasper.compiler.Mark where,
                           JasperException je)
                    throws JasperException
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.

参数:
where - The location information (containing file name, line number, and column number) to prepend
je - The JasperException to amend
抛出:
JasperException

javacError

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

javacError

public void javacError(String errorReport,
                       Exception e)
                throws JasperException
抛出:
JasperException

parseJavacMessage

public static JavacErrorDetail[] parseJavacMessage(Node.Nodes pageNodes,
                                                   String errMsg,
                                                   String fname)
                                            throws IOException,
                                                   JasperException
抛出:
IOException
JasperException

createJavacError

public static JavacErrorDetail createJavacError(String fname,
                                                Node.Nodes page,
                                                StringBuilder errMsgBuf,
                                                int lineNum)
                                         throws JasperException
参数:
fname -
page -
errMsgBuf -
lineNum -
返回:
JavacErrorDetail The error details
抛出:
JasperException


Copyright © 2013. All Rights Reserved.