1 /* src/vm/exceptions.hpp - exception related functions prototypes
3 Copyright (C) 1996-2005, 2006, 2007, 2008
4 CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO
6 This file is part of CACAO.
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License as
10 published by the Free Software Foundation; either version 2, or (at
11 your option) any later version.
13 This program is distributed in the hope that it will be useful, but
14 WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
26 #ifndef _EXCEPTIONS_HPP
27 #define _EXCEPTIONS_HPP
32 #include "vm/global.h"
33 #include "vm/references.h"
34 #include "vm/method.hpp"
37 /* function prototypes ********************************************************/
43 java_handle_t *exceptions_get_exception(void);
44 void exceptions_set_exception(java_handle_t *o);
45 void exceptions_clear_exception(void);
46 java_handle_t *exceptions_get_and_clear_exception(void);
49 /* functions to generate compiler exceptions */
51 java_handle_t *exceptions_new_abstractmethoderror(void);
52 java_object_t *exceptions_asm_new_abstractmethoderror(u1 *sp, u1 *ra);
53 java_handle_t *exceptions_new_arraystoreexception(void);
55 void exceptions_throw_abstractmethoderror(void);
56 void exceptions_throw_classcircularityerror(classinfo *c);
57 void exceptions_throw_classformaterror(classinfo *c, const char *message, ...);
58 void exceptions_throw_classnotfoundexception(utf *name);
59 void exceptions_throw_noclassdeffounderror(utf *name);
60 void exceptions_throw_noclassdeffounderror_cause(java_handle_t *cause);
61 void exceptions_throw_noclassdeffounderror_wrong_name(classinfo *c, utf *name);
62 void exceptions_throw_linkageerror(const char *message, classinfo *c);
63 void exceptions_throw_nosuchfielderror(classinfo *c, utf *name);
64 void exceptions_throw_nosuchmethoderror(classinfo *c, utf *name, utf *desc);
65 void exceptions_throw_exceptionininitializererror(java_handle_t *cause);
66 void exceptions_throw_incompatibleclasschangeerror(classinfo *c,
68 void exceptions_throw_instantiationerror(classinfo *c);
69 void exceptions_throw_internalerror(const char *message, ...);
70 void exceptions_throw_outofmemoryerror(void);
71 void exceptions_throw_verifyerror(methodinfo *m, const char *message, ...);
72 void exceptions_throw_verifyerror_for_stack(methodinfo *m, int type);
73 void exceptions_throw_unsatisfiedlinkerror(utf *name);
74 void exceptions_throw_unsupportedclassversionerror(classinfo *c, u4 ma, u4 mi);
76 java_handle_t *exceptions_new_arithmeticexception(void);
78 java_handle_t *exceptions_new_arrayindexoutofboundsexception(s4 index);
79 void exceptions_throw_arrayindexoutofboundsexception(void);
80 void exceptions_throw_arraystoreexception(void);
82 java_handle_t *exceptions_new_classcastexception(java_handle_t *o);
84 void exceptions_throw_clonenotsupportedexception(void);
85 void exceptions_throw_illegalaccessexception(utf *message);
86 void exceptions_throw_illegalargumentexception(void);
87 void exceptions_throw_illegalmonitorstateexception(void);
88 void exceptions_throw_interruptedexception(void);
89 void exceptions_throw_instantiationexception(classinfo *c);
90 void exceptions_throw_invocationtargetexception(java_handle_t *cause);
91 void exceptions_throw_negativearraysizeexception(void);
93 java_handle_t *exceptions_new_nullpointerexception(void);
94 void exceptions_throw_nullpointerexception(void);
95 void exceptions_throw_privilegedactionexception(java_handle_t *cause);
96 void exceptions_throw_stringindexoutofboundsexception(void);
98 java_handle_t *exceptions_fillinstacktrace(void);
100 void exceptions_print_exception(java_handle_t *xptr);
101 void exceptions_print_current_exception(void);
102 void exceptions_print_stacktrace(void);
108 #endif // _EXCEPTIONS_HPP
112 * These are local overrides for various environment variables in Emacs.
113 * Please do not remove this and leave it at the end of the file, where
114 * Emacs will automagically detect them.
115 * ---------------------------------------------------------------------
118 * indent-tabs-mode: t
122 * vim:noexpandtab:sw=4:ts=4: