mirror of
https://github.com/NekoX-Dev/NekoX.git
synced 2024-11-30 13:40:55 +01:00
15 lines
371 B
C
15 lines
371 B
C
#include "utils.h"
|
|
|
|
void throwException(JNIEnv *env, char *format, ...) {
|
|
jclass exClass = (*env)->FindClass(env, "java/lang/UnsupportedOperationException");
|
|
if (!exClass) {
|
|
return;
|
|
}
|
|
char dest[256];
|
|
va_list argptr;
|
|
va_start(argptr, format);
|
|
vsprintf(dest, format, argptr);
|
|
va_end(argptr);
|
|
(*env)->ThrowNew(env, exClass, dest);
|
|
}
|