Skip to content

Commit 114ef73

Browse files
authored
Merge pull request #145 from PADL/lhoward/clear-exc-before-throwable
2 parents 37bce97 + 38b39c1 commit 114ef73

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Sources/JavaKit/Exceptions/ExceptionHandling.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,8 @@ extension JNIEnvironment {
2020

2121
// Check whether a Java exception occurred.
2222
if let exception = interface.ExceptionOccurred(self) {
23-
let throwable = Throwable(javaThis: exception, environment: self)
2423
interface.ExceptionClear(self)
25-
throw throwable
24+
throw Throwable(javaThis: exception, environment: self)
2625
}
2726

2827
return result

0 commit comments

Comments
 (0)