1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 package org.apache.struts2.jasper.compiler;
19
20 import org.apache.struts2.jasper.JasperException;
21
22 /***
23 * Interface for handling JSP parse and javac compilation errors.
24 * <p/>
25 * An implementation of this interface may be registered with the
26 * ErrorDispatcher by setting the XXX initialization parameter in the JSP
27 * page compiler and execution servlet in Catalina's web.xml file to the
28 * implementation's fully qualified class name.
29 *
30 * @author Jan Luehe
31 * @author Kin-man Chung
32 */
33 public interface ErrorHandler {
34
35 /***
36 * Processes the given JSP parse error.
37 *
38 * @param fname Name of the JSP file in which the parse error occurred
39 * @param line Parse error line number
40 * @param column Parse error column number
41 * @param msg Parse error message
42 * @param exception Parse exception
43 */
44 public void jspError(String fname, int line, int column, String msg,
45 Exception exception) throws JasperException;
46
47 /***
48 * Processes the given JSP parse error.
49 *
50 * @param msg Parse error message
51 * @param exception Parse exception
52 */
53 public void jspError(String msg, Exception exception)
54 throws JasperException;
55
56 /***
57 * Processes the given javac compilation errors.
58 *
59 * @param details Array of JavacErrorDetail instances corresponding to the
60 * compilation errors
61 */
62 public void javacError(JavacErrorDetail[] details)
63 throws JasperException;
64
65 /***
66 * Processes the given javac error report and exception.
67 *
68 * @param errorReport Compilation error report
69 * @param exception Compilation exception
70 */
71 public void javacError(String errorReport, Exception exception)
72 throws JasperException;
73 }