< prev index next >

src/java.base/share/native/libjava/Throwable.c

Print this page




  27  *      Implementation of class Throwable
  28  *
  29  *      former classruntime.c, Wed Jun 26 18:43:20 1991
  30  */
  31 
  32 #include <stdio.h>
  33 #include <signal.h>
  34 
  35 #include "jni.h"
  36 #include "jvm.h"
  37 
  38 #include "java_lang_Throwable.h"
  39 
  40 /*
  41  * Fill in the current stack trace in this exception.  This is
  42  * usually called automatically when the exception is created but it
  43  * may also be called explicitly by the user.  This routine returns
  44  * `this' so you can write 'throw e.fillInStackTrace();'
  45  */
  46 JNIEXPORT jobject JNICALL
  47 Java_java_lang_Throwable_fillInStackTrace(JNIEnv *env, jobject throwable, jint dummy)
  48 {
  49     JVM_FillInStackTrace(env, throwable);
  50     return throwable;
  51 }


  27  *      Implementation of class Throwable
  28  *
  29  *      former classruntime.c, Wed Jun 26 18:43:20 1991
  30  */
  31 
  32 #include <stdio.h>
  33 #include <signal.h>
  34 
  35 #include "jni.h"
  36 #include "jvm.h"
  37 
  38 #include "java_lang_Throwable.h"
  39 
  40 /*
  41  * Fill in the current stack trace in this exception.  This is
  42  * usually called automatically when the exception is created but it
  43  * may also be called explicitly by the user.  This routine returns
  44  * `this' so you can write 'throw e.fillInStackTrace();'
  45  */
  46 JNIEXPORT jobject JNICALL
  47 Java_java_lang_Throwable_fillInStackTrace(JNIEnv *env, jobject throwable, jobject contScope, jint dummy)
  48 {
  49     JVM_FillInStackTrace(env, throwable, contScope);
  50     return throwable;
  51 }
< prev index next >