+#if defined(ENABLE_JAVAME_CLDC1_1)
+static java_objectheader *exceptions_new_error(utf *message)
+{
+ java_objectheader *o;
+
+ o = exceptions_new_class_utf(class_java_lang_Error, message);
+
+ return o;
+}
+#endif
+
+
+/* exceptions_asm_new_abstractmethoderror **************************************
+
+ Generates a java.lang.AbstractMethodError for
+ asm_abstractmethoderror.
+
+*******************************************************************************/
+
+java_objectheader *exceptions_asm_new_abstractmethoderror(u1 *sp, u1 *ra)
+{
+ stackframeinfo sfi;
+ java_objectheader *e;
+
+ /* create the stackframeinfo (XPC is equal to RA) */
+
+ stacktrace_create_extern_stackframeinfo(&sfi, NULL, sp, ra, ra);
+
+ /* create the exception */
+
+#if defined(ENABLE_JAVASE)
+ e = exceptions_new_abstractmethoderror();
+#else
+ e = exceptions_new_error(utf_java_lang_AbstractMethodError);
+#endif
+
+ /* remove the stackframeinfo */
+
+ stacktrace_remove_stackframeinfo(&sfi);
+
+ return e;
+}
+
+
+/* exceptions_new_arraystoreexception ******************************************
+
+ Generates a java.lang.ArrayStoreException for the VM.
+
+*******************************************************************************/
+
+java_objectheader *exceptions_new_arraystoreexception(void)
+{
+ java_objectheader *o;
+
+ o = exceptions_new_utf(utf_java_lang_ArrayStoreException);
+
+ return o;
+}
+
+
+/* exceptions_throw_abstractmethoderror ****************************************
+
+ Generates and throws a java.lang.AbstractMethodError for the VM.
+
+*******************************************************************************/
+
+void exceptions_throw_abstractmethoderror(void)
+{
+ exceptions_throw_utf(utf_java_lang_AbstractMethodError);
+}
+
+
+/* exceptions_throw_classcircularityerror **************************************
+
+ Generates and throws a java.lang.ClassCircularityError for the
+ classloader.
+
+ IN:
+ c............the class in which the error was found
+
+*******************************************************************************/
+
+void exceptions_throw_classcircularityerror(classinfo *c)
+{
+ java_objectheader *o;
+ char *msg;
+ s4 msglen;
+
+ /* calculate message length */
+
+ msglen = utf_bytes(c->name) + strlen("0");
+
+ /* allocate a buffer */
+
+ msg = MNEW(char, msglen);
+
+ /* print message into allocated buffer */
+
+ utf_copy_classname(msg, c->name);
+
+ o = new_exception_message(utf_java_lang_ClassCircularityError, msg);
+
+ MFREE(msg, char, msglen);
+
+ if (o == NULL)
+ return;
+
+ *exceptionptr = o;
+}
+
+
+/* exceptions_throw_classformaterror *******************************************
+
+ Generates and throws a java.lang.ClassFormatError for the VM.
+
+ IN:
+ c............the class in which the error was found
+ message......UTF-8 format string
+
+*******************************************************************************/
+
+void exceptions_throw_classformaterror(classinfo *c, const char *message, ...)