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 * {@code RuntimeException} is the superclass of all classes that represent
22 * exceptional conditions which occur as a result of executing an application in
23 * the virtual machine. Unlike checked exceptions (exceptions where the type
24 * doesn't extend {@code RuntimeException} or {@link Error}), the compiler does
25 * not require code to handle runtime exceptions.
26 *
27 * @since Android 1.0
28 */
29public class RuntimeException extends Exception {
30
31    private static final long serialVersionUID = -7034897190745766939L;
32
33    /**
34     * Constructs a new {@code RuntimeException} that includes the current stack
35     * trace.
36     *
37     * @since Android 1.0
38     */
39    public RuntimeException() {
40        super();
41    }
42
43    /**
44     * Constructs a new {@code RuntimeException} with the current stack trace
45     * and the specified detail message.
46     *
47     * @param detailMessage
48     *            the detail message for this exception.
49     * @since Android 1.0
50     */
51    public RuntimeException(String detailMessage) {
52        super(detailMessage);
53    }
54
55   /**
56     * Constructs a new {@code RuntimeException} with the current stack trace,
57     * the specified detail message and the specified cause.
58     *
59     * @param detailMessage
60     *            the detail message for this exception.
61     * @param throwable
62     *            the cause of this exception.
63     * @since Android 1.0
64     */
65    public RuntimeException(String detailMessage, Throwable throwable) {
66        super(detailMessage, throwable);
67    }
68
69    /**
70     * Constructs a new {@code RuntimeException} with the current stack trace
71     * and the specified cause.
72     *
73     * @param throwable
74     *            the cause of this exception.
75     * @since Android 1.0
76     */
77    public RuntimeException(Throwable throwable) {
78        super(throwable);
79    }
80}
81