## org.apache.jasper.compiler
Class ErrorDispatcher

    java.lang.Object
      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
`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`

Copyright © 2000 Apache Software Foundation. All Rights Reserved.