Skip to content

Package: JspTagException

JspTagException

nameinstructionbranchcomplexitylinemethod
JspTagException()
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
JspTagException(String)
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
JspTagException(String, Throwable)
M: 5 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
JspTagException(Throwable)
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%

Coverage

1: /*
2: * Copyright (c) 1997, 2020 Oracle and/or its affiliates and others.
3: * All rights reserved.
4: * Copyright 2004 The Apache Software Foundation
5: *
6: * Licensed under the Apache License, Version 2.0 (the "License");
7: * you may not use this file except in compliance with the License.
8: * You may obtain a copy of the License at
9: *
10: * http://www.apache.org/licenses/LICENSE-2.0
11: *
12: * Unless required by applicable law or agreed to in writing, software
13: * distributed under the License is distributed on an "AS IS" BASIS,
14: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15: * See the License for the specific language governing permissions and
16: * limitations under the License.
17: */
18:
19: package jakarta.servlet.jsp;
20:
21: /**
22: * Exception to be used by a Tag Handler to indicate some unrecoverable error. This error is to be caught by the top
23: * level of the JSP page and will result in an error page.
24: */
25: public class JspTagException extends JspException {
26:
27: private static final long serialVersionUID = 1546743964929435607L;
28:
29: /**
30: * Constructs a new JspTagException with the specified message. The message can be written to the server log and/or
31: * displayed for the user.
32: *
33: * @param msg a <code>String</code> specifying the text of the exception message
34: */
35: public JspTagException(String msg) {
36: super(msg);
37: }
38:
39: /**
40: * Constructs a new JspTagException with no message.
41: */
42: public JspTagException() {
43: super();
44: }
45:
46: /**
47: * Constructs a new JspTagException when the JSP Tag needs to throw an exception and include a message about the
48: * "root cause" exception that interfered with its normal operation, including a description message.
49: *
50: *
51: * @param message a <code>String</code> containing the text of the exception message
52: *
53: * @param rootCause the <code>Throwable</code> exception that interfered with the JSP Tag's normal operation, making
54: * this JSP Tag exception necessary
55: *
56: * @since JSP 2.0
57: */
58: public JspTagException(String message, Throwable rootCause) {
59: super(message, rootCause);
60: }
61:
62: /**
63: * Constructs a new JSP Tag exception when the JSP Tag needs to throw an exception and include a message about the
64: * "root cause" exception that interfered with its normal operation. The exception's message is based on the
65: * localized message of the underlying exception.
66: *
67: * <p>
68: * This method calls the <code>getLocalizedMessage</code> method on the <code>Throwable</code> exception to get a
69: * localized exception message. When subclassing <code>JspTagException</code>, this method can be overridden to
70: * create an exception message designed for a specific locale.
71: *
72: * @param rootCause the <code>Throwable</code> exception that interfered with the JSP Tag's normal operation, making
73: * the JSP Tag exception necessary
74: *
75: * @since JSP 2.0
76: */
77: public JspTagException(Throwable rootCause) {
78: super(rootCause);
79: }
80:
81: }