[K/N] Allow to unset unhandled exception hook ^KT-49228

This commit is contained in:
Alexander Shabalin
2022-06-28 11:28:01 +03:00
committed by Space
parent 187fe6d50a
commit 41d6dc5914
2 changed files with 16 additions and 0 deletions
@@ -18,4 +18,9 @@ fun main() {
val hook1 = getUnhandledExceptionHook()
assertEquals(exceptionHook, hook1)
val hook2 = getUnhandledExceptionHook()
assertEquals(exceptionHook, hook2)
val hook3 = setUnhandledExceptionHook(null)
assertEquals(exceptionHook, hook3)
val hook4 = getUnhandledExceptionHook()
assertNull(hook4)
}