01: /*
02: * MCS Media Computer Software
03: * Copyright (c) 2005 by MCS
04: * --------------------------------------
05: * Created on 23.04.2005 by w.klaas
06: *
07: * Licensed under the Apache License, Version 2.0 (the "License");
08: * you may not use this file except in compliance with the License.
09: * You may obtain a copy of the License at
10: *
11: * http://www.apache.org/licenses/LICENSE-2.0
12: *
13: * Unless required by applicable law or agreed to in writing, software
14: * distributed under the License is distributed on an "AS IS" BASIS,
15: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16: * See the License for the specific language governing permissions and
17: * limitations under the License.
18: */
19: package de.mcs.jmeasurement;
20:
21: /**
22: * Main Exception class for this package. Only to act as an indicator.
23: *
24: * @author w.klaas
25: */
26: public class MeasurementException extends Exception {
27:
28: /**
29: *
30: */
31: private static final long serialVersionUID = -1165943968933029052L;
32:
33: /**
34: * Constructs a new measurement exception with <code>null</code> as its
35: * detail message. The cause is not initialized, and may subsequently be
36: * initialized by a call to {@link #initCause}.
37: */
38: public MeasurementException() {
39: super ();
40: }
41:
42: /**
43: * Constructs a new measurement exception with the specified detail message.
44: * The cause is not initialized, and may subsequently be initialized by a
45: * call to {@link #initCause}.
46: *
47: * @param message
48: * the detail message. The detail message is saved for later
49: * retrieval by the {@link #getMessage()}method.
50: */
51: public MeasurementException(final String message) {
52: super (message);
53: }
54:
55: /**
56: * Constructs a new measurement exception with the specified detail message
57: * and cause.
58: * <p>
59: * Note that the detail message associated with <code>cause</code> is
60: * <i>not </i> automatically incorporated in this measurement exception's
61: * detail message.
62: *
63: * @param message
64: * the detail message (which is saved for later retrieval by the
65: * {@link #getMessage()}method).
66: * @param cause
67: * the cause (which is saved for later retrieval by the
68: * {@link #getCause()}method). (A<tt>null</tt> value is
69: * permitted, and indicates that the cause is nonexistent or
70: * unknown.)
71: * @since 1.4
72: */
73: public MeasurementException(final String message,
74: final Throwable cause) {
75: super (message, cause);
76: }
77:
78: /**
79: * Constructs a new measurement exception with the specified cause and a
80: * detail message of <tt>(cause==null ? null : cause.toString())</tt>
81: * (which typically contains the class and detail message of <tt>cause</tt>).
82: * This constructor is useful for measurement exceptions that are little
83: * more than wrappers for other throwables.
84: *
85: * @param cause
86: * the cause (which is saved for later retrieval by the
87: * {@link #getCause()}method). (A<tt>null</tt> value is
88: * permitted, and indicates that the cause is nonexistent or
89: * unknown.)
90: * @since 1.4
91: */
92: public MeasurementException(final Throwable cause) {
93: super(cause);
94: }
95:
96: }
|