Commit 2280b0b0 authored by Thomas Guillem's avatar Thomas Guillem

libvlcjni: add VLCJNI_EX_RUNTIME

parent 18029ae9
......@@ -93,6 +93,7 @@ enum vlcjni_exception
{
VLCJNI_EX_ILLEGAL_STATE,
VLCJNI_EX_ILLEGAL_ARGUMENT,
VLCJNI_EX_RUNTIME,
VLCJNI_EX_OUT_OF_MEMORY,
};
......@@ -112,6 +113,9 @@ static inline void throw_Exception(JNIEnv *env, enum vlcjni_exception type,
case VLCJNI_EX_ILLEGAL_STATE:
clazz = fields.IllegalStateException.clazz;
break;
case VLCJNI_EX_RUNTIME:
clazz = fields.RuntimeException.clazz;
break;
case VLCJNI_EX_OUT_OF_MEMORY:
clazz = fields.OutOfMemoryError.clazz;
break;
......
......@@ -145,6 +145,8 @@ int VLCJNI_OnLoad(JavaVM *vm, JNIEnv* env)
"java/lang/IllegalStateException", true);
GET_CLASS(fields.IllegalArgumentException.clazz,
"java/lang/IllegalArgumentException", true);
GET_CLASS(fields.RuntimeException.clazz,
"java/lang/RuntimeException", true);
GET_CLASS(fields.OutOfMemoryError.clazz,
"java/lang/OutOfMemoryError", true);
GET_CLASS(fields.String.clazz,
......@@ -347,6 +349,7 @@ void VLCJNI_OnUnload(JavaVM *vm, JNIEnv *env)
{
(*env)->DeleteGlobalRef(env, fields.IllegalStateException.clazz);
(*env)->DeleteGlobalRef(env, fields.IllegalArgumentException.clazz);
(*env)->DeleteGlobalRef(env, fields.RuntimeException.clazz);
(*env)->DeleteGlobalRef(env, fields.OutOfMemoryError.clazz);
(*env)->DeleteGlobalRef(env, fields.String.clazz);
(*env)->DeleteGlobalRef(env, fields.VLCObject.clazz);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment