Relax setUnhandledExceptionHook requirements with the new MM (#4675)
This commit is contained in:
committed by
Vasily Levchenko
parent
2b69a0d03a
commit
99dc9e8e0c
@@ -45,7 +45,7 @@ public typealias ReportUnhandledExceptionHook = Function1<Throwable, Unit>
|
||||
* with custom exception hooks.
|
||||
*/
|
||||
public fun setUnhandledExceptionHook(hook: ReportUnhandledExceptionHook): ReportUnhandledExceptionHook? {
|
||||
if (!hook.isFrozen) {
|
||||
if (Platform.memoryModel != MemoryModel.EXPERIMENTAL && !hook.isFrozen) {
|
||||
throw InvalidMutabilityException("Unhandled exception hook must be frozen")
|
||||
}
|
||||
return setUnhandledExceptionHook0(hook)
|
||||
|
||||
Reference in New Issue
Block a user