-
Notifications
You must be signed in to change notification settings - Fork 6
/
JNIExceptions.swift
38 lines (31 loc) · 989 Bytes
/
JNIExceptions.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import CJNI
public extension JNI {
public func ExceptionCheck() -> jboolean {
let env = self._env
return env.memory.memory.ExceptionCheck(env)
}
public func ExceptionDescribe() {
let env = self._env
env.memory.memory.ExceptionDescribe(env)
}
public func ExceptionClear() {
let env = self._env
env.memory.memory.ExceptionClear(env)
}
public func ExceptionOccurred() -> jthrowable {
let env = self._env
return env.memory.memory.ExceptionOccurred(env)
}
public func Throw(obj: jthrowable) -> jint {
let env = self._env
return env.memory.memory.Throw(env, obj)
}
public func ThrowNew(targetClass: jclass, _ message: String) -> jint {
let env = self._env
return env.memory.memory.ThrowNew(env, targetClass, message)
}
public func FatalError(msg: String) {
let env = self._env
env.memory.memory.FatalError(env, msg)
}
}