Notice that if a Java program calls System.exit()
, then the system call exit(2) will
still be made, but with that requested exit code, having nothing to do with these codes. However, Most exit situations are set up with fprintf(stderr) immediately
before the exit(2) call
itself, so console output should demonstrate proper context if there is ever a question.
Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
Licensed under the Apache License, Version 2.0 ("the License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and limitations under the License.
Definition in file exit.h.
Go to the source code of this file.
Exit code enumeration definitions and name strings. | |
Codes and null-terminated strings for constructing exit_code_enum enum and exit_get_name() switch, respectively.
NEVER change definition of EXIT_MAIN_OKAY! It is the normal return from exit_init() function by virtue of
NEVER change the definition of EXIT_LONGJMP_ARGERROR! It is defined by | |
#define | EXIT_ARGV_COPYRIGHT_DESC "copyright request" |
#define | EXIT_ARGV_ENVIRONMENT_DESC "environment request" |
#define | EXIT_ARGV_HELP_DESC "help request" |
#define | EXIT_ARGV_LICENSE_DESC "license request" |
#define | EXIT_ARGV_VERSION_DESC "version request" |
#define | EXIT_CLASSPATH_JAR_DESC "cannot run jar command" |
#define | EXIT_GC_ALLOC_DESC "Garbage collection heap error" |
#define | EXIT_HEAP_ALLOC_DESC "Heap allocation error" |
#define | EXIT_JVM_ATTRIBUTE_DESC "attribute access error" |
#define | EXIT_JVM_BYTECODE_DESC "JVM byte code execution error" |
#define | EXIT_JVM_CLASS_DESC "class load error" |
#define | EXIT_JVM_FIELD_DESC "field access error" |
#define | EXIT_JVM_GC_DESC "Garbage collection error" |
#define | EXIT_JVM_INTERNAL_DESC "Internal JVM logic error" |
#define | EXIT_JVM_METHOD_DESC "method invocation error" |
#define | EXIT_JVM_OBJECT_DESC "object load error" |
#define | EXIT_JVM_SIGNAL_DESC "OS signal abort trapped" |
#define | EXIT_JVM_THREAD_DESC "thread start error" |
#define | EXIT_JVM_THROWABLE_DESC "throwable event abort" |
#define | EXIT_LONGJMP_ARGERROR_DESC "longjmp(3) argument error" |
#define | EXIT_MAIN_OKAY_DESC "no error" |
#define | EXIT_MANIFEST_JAR_DESC "cannot process jar manifest file" |
#define | EXIT_THREAD_STACK_DESC "Stack overflow suppressed" |
#define | EXIT_TIMESLICE_START_DESC "cannot start timer" |
#define | EXIT_TMPAREA_MKDIR_DESC "cannot make temp directory" |
#define | EXIT_TMPAREA_RMDIR_DESC "cannot remove temp directory" |
enum | exit_code_enum { EXIT_MAIN_OKAY = 0, EXIT_LONGJMP_ARGERROR = 1, EXIT_ARGV_HELP = 10, EXIT_ARGV_VERSION = 11, EXIT_ARGV_COPYRIGHT = 12, EXIT_ARGV_LICENSE = 13, EXIT_ARGV_ENVIRONMENT = 14, EXIT_JVM_THREAD = 20, EXIT_JVM_CLASS = 21, EXIT_JVM_OBJECT = 22, EXIT_JVM_METHOD = 23, EXIT_JVM_FIELD = 24, EXIT_JVM_ATTRIBUTE = 25, EXIT_JVM_THROWABLE = 26, EXIT_JVM_SIGNAL = 27, EXIT_JVM_BYTECODE = 28, EXIT_JVM_GC = 29, EXIT_JVM_INTERNAL = 30, EXIT_HEAP_ALLOC = 31, EXIT_GC_ALLOC = 32, EXIT_THREAD_STACK = 33, EXIT_TIMESLICE_START = 34, EXIT_TMPAREA_MKDIR = 35, EXIT_TMPAREA_RMDIR = 36, EXIT_CLASSPATH_JAR = 37, EXIT_MANIFEST_JAR = 38 } |
Functions | |
ARCH_COPYRIGHT_APACHE (exit, h,"$URL: https://svn.apache.org/path/name/exit.h $ $Id: exit.h 0 09/28/2005 dlydick $") | |
int | exit_end_thread_setup (rvoid) |
rvoid | exit_end_thread_test (jvm_thread_index thridx) |
int | exit_exception_setup (rvoid) |
Global handler setup for fatal jvm_init() errors and other java.lang.Throwable events-- implements setjmp(3). | |
rchar * | exit_get_name (exit_code_enum code) |
Return a descriptive name string for each exit code. | |
int | exit_init (rvoid) |
rvoid | exit_jvm (exit_code_enum rc) |
Global handler invocation for fatal JVM errors-- implements longjmp(3). | |
rvoid | exit_throw_exception (exit_code_enum rc, rchar *preason) |
Global handler for initialization linkage errors, per spec section 2.17.x -- implements longjmp(3). | |
Variables | |
rchar * | exit_LinkageError_subclass |
jvm_thread_index | exit_LinkageError_thridx |
|
Definition at line 76 of file exit.h. Referenced by exit_get_name(). |
|
Definition at line 77 of file exit.h. Referenced by exit_get_name(). |
|
Definition at line 79 of file exit.h. Referenced by exit_get_name(). |
|
Definition at line 80 of file exit.h. Referenced by exit_get_name(). |
|
Definition at line 81 of file exit.h. Referenced by exit_get_name(). |
|
Definition at line 82 of file exit.h. Referenced by exit_get_name(). |
|
Definition at line 83 of file exit.h. Referenced by exit_get_name(). |
|
Definition at line 85 of file exit.h. Referenced by exit_get_name(). |
|
Definition at line 86 of file exit.h. Referenced by exit_get_name(). |
|
Definition at line 87 of file exit.h. Referenced by exit_get_name(). |
|
Definition at line 88 of file exit.h. Referenced by exit_get_name(). |
|
Definition at line 89 of file exit.h. Referenced by exit_get_name(). |
|
Definition at line 90 of file exit.h. Referenced by exit_get_name(). |
|
Definition at line 91 of file exit.h. Referenced by exit_get_name(). |
|
Definition at line 92 of file exit.h. Referenced by exit_get_name(). |
|
Definition at line 93 of file exit.h. Referenced by exit_get_name(). |
|
Definition at line 94 of file exit.h. Referenced by exit_get_name(). |
|
Definition at line 95 of file exit.h. Referenced by exit_get_name(). |
|
Definition at line 97 of file exit.h. Referenced by exit_get_name(). |
|
Definition at line 98 of file exit.h. Referenced by exit_get_name(). |
|
Definition at line 99 of file exit.h. Referenced by exit_get_name(). |
|
Definition at line 100 of file exit.h. Referenced by exit_get_name(). |
|
Definition at line 101 of file exit.h. Referenced by exit_get_name(). |
|
Definition at line 102 of file exit.h. Referenced by exit_get_name(). |
|
Definition at line 103 of file exit.h. Referenced by exit_get_name(). |
|
Definition at line 104 of file exit.h. Referenced by exit_get_name(). |
|
|
|
|
|
|
Return a descriptive name string for each exit code.
Definition at line 105 of file exit.c. References EXIT_ARGV_COPYRIGHT, EXIT_ARGV_COPYRIGHT_DESC, EXIT_ARGV_ENVIRONMENT, EXIT_ARGV_ENVIRONMENT_DESC, EXIT_ARGV_HELP, EXIT_ARGV_HELP_DESC, EXIT_ARGV_LICENSE, EXIT_ARGV_LICENSE_DESC, EXIT_ARGV_VERSION, EXIT_ARGV_VERSION_DESC, EXIT_CLASSPATH_JAR, EXIT_CLASSPATH_JAR_DESC, EXIT_GC_ALLOC, EXIT_GC_ALLOC_DESC, EXIT_HEAP_ALLOC, EXIT_HEAP_ALLOC_DESC, EXIT_JVM_ATTRIBUTE, EXIT_JVM_ATTRIBUTE_DESC, EXIT_JVM_BYTECODE, EXIT_JVM_BYTECODE_DESC, EXIT_JVM_CLASS, EXIT_JVM_CLASS_DESC, EXIT_JVM_FIELD, EXIT_JVM_FIELD_DESC, EXIT_JVM_GC, EXIT_JVM_GC_DESC, EXIT_JVM_INTERNAL, EXIT_JVM_INTERNAL_DESC, EXIT_JVM_METHOD, EXIT_JVM_METHOD_DESC, EXIT_JVM_OBJECT, EXIT_JVM_OBJECT_DESC, EXIT_JVM_SIGNAL, EXIT_JVM_SIGNAL_DESC, EXIT_JVM_THREAD, EXIT_JVM_THREAD_DESC, EXIT_JVM_THROWABLE, EXIT_JVM_THROWABLE_DESC, EXIT_LONGJMP_ARGERROR, EXIT_LONGJMP_ARGERROR_DESC, EXIT_MAIN_OKAY, EXIT_MAIN_OKAY_DESC, EXIT_MANIFEST_JAR, EXIT_MANIFEST_JAR_DESC, EXIT_THREAD_STACK, EXIT_THREAD_STACK_DESC, EXIT_TIMESLICE_START, EXIT_TIMESLICE_START_DESC, EXIT_TMPAREA_MKDIR, EXIT_TMPAREA_MKDIR_DESC, EXIT_TMPAREA_RMDIR, and EXIT_TMPAREA_RMDIR_DESC. Referenced by opcode_load_run_throwable(). |
|
Global handler setup for fatal jvm_init() errors and other
Use this function to arm handler for throwing Parameters: rvoid
Definition at line 215 of file exit.c. References exit_LinkageError, exit_LinkageError_subclass, exit_LinkageError_thridx, jvm_thread_index_null, and rnull. Referenced by opcode_load_run_throwable(). |
|
Global handler for initialization linkage errors, per spec section 2.17.x -- implements
Use this function to throw This is a global handler invocation first for jvm_init() during startup and then runtime events. A wide variety of runtime conditions may be expressed in the combination of rc and preason. Judicious combinations of exit codes and error classes will greatly limit the need for expanding on the number of values for either parameter, yet can express many different nuances of errors.
Definition at line 287 of file exit.c. References CURRENT_THREAD, exit_LinkageError, exit_LinkageError_subclass, and exit_LinkageError_thridx. Referenced by class_allocate_slot(), class_load_primative(), field_find_by_cp_entry(), heap_get_common_simple_bimodal(), linkage_resolve_class(), method_find_by_cp_entry(), native_run_local_return_jdouble(), native_run_local_return_jfloat(), native_run_local_return_jint(), native_run_local_return_jlong(), native_run_local_return_jobject(), native_run_local_return_jvoid(), native_run_method(), native_verify_ordinal_definition(), object_allocate_slot(), object_run_method(), opcode_run(), thread_exception_setup(), thread_new(), and thread_state_get_name(). |
|
|
|
|
|
Global handler invocation for fatal JVM errors-- implements
Definition at line 321 of file exit.c. Referenced by argv_init(), heap_init_bimodal(), jvm_manual_thread_run(), manifest_get_main(), object_run_method(), opcode_load_run_throwable(), opcode_run(), timeslice_init(), and timeslice_run(). |
|
Class to run on non-local return. Give global visibility for use by users of exit_throw_exception(). Definition at line 159 of file exit.c. Referenced by exit_exception_setup(), exit_throw_exception(), and opcode_load_run_throwable(). |
|
Thread where error occurred. Give global visibility for use by users of exit_throw_exception(). Definition at line 167 of file exit.c. Referenced by exit_exception_setup(), and exit_throw_exception(). |