rt/emul/mini/src/main/java/java/lang/ArithmeticException.java
author Jaroslav Tulach <jaroslav.tulach@apidesign.org>
Sun, 28 Apr 2013 09:46:23 +0200
branchmodel
changeset 1031 660187048c64
parent 1030 emul/src/main/java/java/lang/ArithmeticException.java@0035ab74249f
child 1146 e499b0dddd12
permissions -rw-r--r--
Moving things around in model branch revealed the need for having ArithmeticException in the emulation library
jaroslav@1030
     1
/*
jaroslav@1030
     2
 * Copyright (c) 1994, 2011, Oracle and/or its affiliates. All rights reserved.
jaroslav@1030
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
jaroslav@1030
     4
 *
jaroslav@1030
     5
 * This code is free software; you can redistribute it and/or modify it
jaroslav@1030
     6
 * under the terms of the GNU General Public License version 2 only, as
jaroslav@1030
     7
 * published by the Free Software Foundation.  Oracle designates this
jaroslav@1030
     8
 * particular file as subject to the "Classpath" exception as provided
jaroslav@1030
     9
 * by Oracle in the LICENSE file that accompanied this code.
jaroslav@1030
    10
 *
jaroslav@1030
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
jaroslav@1030
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
jaroslav@1030
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
jaroslav@1030
    14
 * version 2 for more details (a copy is included in the LICENSE file that
jaroslav@1030
    15
 * accompanied this code).
jaroslav@1030
    16
 *
jaroslav@1030
    17
 * You should have received a copy of the GNU General Public License version
jaroslav@1030
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
jaroslav@1030
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
jaroslav@1030
    20
 *
jaroslav@1030
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
jaroslav@1030
    22
 * or visit www.oracle.com if you need additional information or have any
jaroslav@1030
    23
 * questions.
jaroslav@1030
    24
 */
jaroslav@1030
    25
jaroslav@1030
    26
package java.lang;
jaroslav@1030
    27
jaroslav@1030
    28
/**
jaroslav@1030
    29
 * Thrown when an exceptional arithmetic condition has occurred. For
jaroslav@1030
    30
 * example, an integer "divide by zero" throws an
jaroslav@1030
    31
 * instance of this class.
jaroslav@1030
    32
 *
jaroslav@1030
    33
 * {@code ArithmeticException} objects may be constructed by the
jaroslav@1030
    34
 * virtual machine as if {@linkplain Throwable#Throwable(String,
jaroslav@1030
    35
 * Throwable, boolean, boolean) suppression were disabled and/or the
jaroslav@1030
    36
 * stack trace was not writable}.
jaroslav@1030
    37
 *
jaroslav@1030
    38
 * @author  unascribed
jaroslav@1030
    39
 * @since   JDK1.0
jaroslav@1030
    40
 */
jaroslav@1030
    41
public class ArithmeticException extends RuntimeException {
jaroslav@1030
    42
    private static final long serialVersionUID = 2256477558314496007L;
jaroslav@1030
    43
jaroslav@1030
    44
    /**
jaroslav@1030
    45
     * Constructs an {@code ArithmeticException} with no detail
jaroslav@1030
    46
     * message.
jaroslav@1030
    47
     */
jaroslav@1030
    48
    public ArithmeticException() {
jaroslav@1030
    49
        super();
jaroslav@1030
    50
    }
jaroslav@1030
    51
jaroslav@1030
    52
    /**
jaroslav@1030
    53
     * Constructs an {@code ArithmeticException} with the specified
jaroslav@1030
    54
     * detail message.
jaroslav@1030
    55
     *
jaroslav@1030
    56
     * @param   s   the detail message.
jaroslav@1030
    57
     */
jaroslav@1030
    58
    public ArithmeticException(String s) {
jaroslav@1030
    59
        super(s);
jaroslav@1030
    60
    }
jaroslav@1030
    61
}