01: /*
02: * Copyright 1999,2004 The Apache Software Foundation.
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16:
17: package org.apache.jasper.compiler;
18:
19: import org.apache.jasper.JasperException;
20:
21: /**
22: * Interface for handling JSP parse and javac compilation errors.
23: *
24: * An implementation of this interface may be registered with the
25: * ErrorDispatcher by setting the XXX initialization parameter in the JSP
26: * page compiler and execution servlet in Catalina's web.xml file to the
27: * implementation's fully qualified class name.
28: *
29: * @author Jan Luehe
30: * @author Kin-man Chung
31: */
32: public interface ErrorHandler {
33:
34: /**
35: * Processes the given JSP parse error.
36: *
37: * @param fname Name of the JSP file in which the parse error occurred
38: * @param line Parse error line number
39: * @param column Parse error column number
40: * @param msg Parse error message
41: * @param exception Parse exception
42: */
43: public void jspError(String fname, int line, int column,
44: String msg, Exception exception) throws JasperException;
45:
46: /**
47: * Processes the given JSP parse error.
48: *
49: * @param msg Parse error message
50: * @param exception Parse exception
51: */
52: public void jspError(String msg, Exception exception)
53: throws JasperException;
54:
55: /**
56: * Processes the given javac compilation errors.
57: *
58: * @param details Array of JavacErrorDetail instances corresponding to the
59: * compilation errors
60: */
61: public void javacError(JavacErrorDetail[] details)
62: throws JasperException;
63:
64: /**
65: * Processes the given javac error report and exception.
66: *
67: * @param errorReport Compilation error report
68: * @param exception Compilation exception
69: */
70: public void javacError(String errorReport, Exception exception)
71: throws JasperException;
72: }
|