rt/emul/mini/src/main/java/java/lang/OutOfMemoryError.java
author Jaroslav Tulach <jaroslav.tulach@apidesign.org>
Tue, 26 Feb 2013 16:54:16 +0100
changeset 772 d382dacfd73f
parent 554 emul/mini/src/main/java/java/lang/OutOfMemoryError.java@05224402145d
permissions -rw-r--r--
Moving modules around so the runtime is under one master pom and can be built without building other modules that are in the repository
jaroslav@76
     1
/*
jaroslav@76
     2
 * Copyright (c) 1994, 2011, Oracle and/or its affiliates. All rights reserved.
jaroslav@76
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
jaroslav@76
     4
 *
jaroslav@76
     5
 * This code is free software; you can redistribute it and/or modify it
jaroslav@76
     6
 * under the terms of the GNU General Public License version 2 only, as
jaroslav@76
     7
 * published by the Free Software Foundation.  Oracle designates this
jaroslav@76
     8
 * particular file as subject to the "Classpath" exception as provided
jaroslav@76
     9
 * by Oracle in the LICENSE file that accompanied this code.
jaroslav@76
    10
 *
jaroslav@76
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
jaroslav@76
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
jaroslav@76
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
jaroslav@76
    14
 * version 2 for more details (a copy is included in the LICENSE file that
jaroslav@76
    15
 * accompanied this code).
jaroslav@76
    16
 *
jaroslav@76
    17
 * You should have received a copy of the GNU General Public License version
jaroslav@76
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
jaroslav@76
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
jaroslav@76
    20
 *
jaroslav@76
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
jaroslav@76
    22
 * or visit www.oracle.com if you need additional information or have any
jaroslav@76
    23
 * questions.
jaroslav@76
    24
 */
jaroslav@76
    25
jaroslav@76
    26
package java.lang;
jaroslav@76
    27
jaroslav@76
    28
/**
jaroslav@76
    29
 * Thrown when the Java Virtual Machine cannot allocate an object
jaroslav@76
    30
 * because it is out of memory, and no more memory could be made
jaroslav@76
    31
 * available by the garbage collector.
jaroslav@76
    32
 *
jaroslav@76
    33
 * {@code OutOfMemoryError} objects may be constructed by the virtual
jaroslav@76
    34
 * machine as if {@linkplain Throwable#Throwable(String, Throwable,
jaroslav@76
    35
 * boolean, boolean) suppression were disabled and/or the stack trace was not
jaroslav@76
    36
 * writable}.
jaroslav@76
    37
 *
jaroslav@76
    38
 * @author  unascribed
jaroslav@76
    39
 * @since   JDK1.0
jaroslav@76
    40
 */
jaroslav@76
    41
public class OutOfMemoryError extends VirtualMachineError {
jaroslav@76
    42
    private static final long serialVersionUID = 8228564086184010517L;
jaroslav@76
    43
jaroslav@76
    44
    /**
jaroslav@76
    45
     * Constructs an {@code OutOfMemoryError} with no detail message.
jaroslav@76
    46
     */
jaroslav@76
    47
    public OutOfMemoryError() {
jaroslav@76
    48
        super();
jaroslav@76
    49
    }
jaroslav@76
    50
jaroslav@76
    51
    /**
jaroslav@76
    52
     * Constructs an {@code OutOfMemoryError} with the specified
jaroslav@76
    53
     * detail message.
jaroslav@76
    54
     *
jaroslav@76
    55
     * @param   s   the detail message.
jaroslav@76
    56
     */
jaroslav@76
    57
    public OutOfMemoryError(String s) {
jaroslav@76
    58
        super(s);
jaroslav@76
    59
    }
jaroslav@76
    60
}