JavaExceptions.h revision 0
0N/A * Copyright 2003 Sun Microsystems, Inc. All Rights Reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 0N/A * published by the Free Software Foundation. Sun designates this 0N/A * particular file as subject to the "Classpath" exception as provided 0N/A * by Sun in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 0N/A * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 0N/A * CA 95054 USA or visit www.sun.com if you need additional information or 0N/A * have any questions. 0N/A * Copyright 2003 Wily Technology, Inc. 0N/A * This module contains utility routines for manipulating Java throwables 0N/A * and JNIEnv throwable state from native code. 0N/A * Set up static state. Needs java, must be called at or after VMInit. 0N/A * Returns true if it succeeds, false if it fails. 0N/A * Mapping support. Allows different clients to map checked exceptions in different ways. 0N/A/* Default mapper. Map everything checked to InternalError; can return null if error */ 0N/A * Exception-helper routines that do not modify the JNIEnv. 0N/A * They require a clean JNIEnv on entry, and they guarantee a clean JNIEnv on exit. 0N/A/* creates a throwable from the supplied parameters; can return null if error */ 0N/A/* creates a java.lang.InternalError; can return null if error */ 0N/A/* creates the appropriate java Throwable based on the error code; can return null if error */ 0N/A/* fetches the message string out of the supplied throwable, null if there is none, null if error */ 0N/A/* true if the supplied throwable is unchecked. null will return true. */ 0N/A/* true if the env contains a thrown exception */ 0N/A/* true if the env is clean for JNI calls */ 0N/A * Logs the outstanding throwable, if one exists. 0N/A * This call assumes an outstanding exception, but does not 0N/A * modify the JNIEnv outstanding Throwable state. 0N/A * These routines do modify the JNIEnv outstanding Throwable state. 0N/A/* Throws the supplied throwable. always sets the JNIEnv throwable */ 0N/A/* returns current throwable. always clears the JNIEnv exception */ 0N/A/* undoes preserveThrowable (Throws the supplied throwable). always sets the JNIEnv throwable */ 0N/A/* always clears the JNIEnv throwable. returns true if an exception was pending on entry. */ 0N/A/* creates the appropriate java Throwable based on the error code 0N/A * does the very best it can to make sure an exception ends up installed; uses fallback if necessary 0N/A * always sets the JNIEnv exception 0N/A/* creates a java.lang.InternalError and installs it into the JNIEnv. 0N/A * does the very best it can to make sure an exception ends up installed; uses fallback if necessary 0N/A * always sets the JNIEnv exception 0N/A/* If no throwable is outstanding, do nothing. 0N/A * If a throwable is outstanding, make sure it is of a legal type according to the supplied 0N/A * Leaves the "thrown" state the same (none on exit if none on entry, thrown on exit if 0N/A * thrown on entry); may change the type of the thrown exception. 0N/A#
endif /* __cplusplus */