1/*
2 *  Licensed to the Apache Software Foundation (ASF) under one or more
3 *  contributor license agreements.  See the NOTICE file distributed with
4 *  this work for additional information regarding copyright ownership.
5 *  The ASF licenses this file to You under the Apache License, Version 2.0
6 *  (the "License"); you may not use this file except in compliance with
7 *  the License.  You may obtain a copy of the License at
8 *
9 *     http://www.apache.org/licenses/LICENSE-2.0
10 *
11 *  Unless required by applicable law or agreed to in writing, software
12 *  distributed under the License is distributed on an "AS IS" BASIS,
13 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 *  See the License for the specific language governing permissions and
15 *  limitations under the License.
16 */
17
18package java.lang;
19
20
21/**
22 * {@code Error} is the superclass of all classes that represent unrecoverable
23 * errors. When errors are thrown, they should not be caught by application
24 * code.
25 *
26 * @see Throwable
27 * @see Exception
28 * @see RuntimeException
29 */
30public class Error extends Throwable {
31
32    private static final long serialVersionUID = 4980196508277280342L;
33
34    /**
35     * Constructs a new {@code Error} that includes the current stack trace.
36     */
37    public Error() {
38    }
39
40    /**
41     * Constructs a new {@code Error} with the current stack trace and the
42     * specified detail message.
43     *
44     * @param detailMessage
45     *            the detail message for this error.
46     */
47    public Error(String detailMessage) {
48        super(detailMessage);
49    }
50
51    /**
52     * Constructs a new {@code Error} with the current stack trace, the
53     * specified detail message and the specified cause.
54     *
55     * @param detailMessage
56     *            the detail message for this error.
57     * @param throwable
58     *            the cause of this error.
59     */
60    public Error(String detailMessage, Throwable throwable) {
61        super(detailMessage, throwable);
62    }
63
64    /**
65     * Constructs a new {@code Error} with the current stack trace and the
66     * specified cause.
67     *
68     * @param throwable
69     *            the cause of this error.
70     */
71    public Error(Throwable throwable) {
72        super(throwable);
73    }
74}
75