java: Simplify exception handling in entry point

This commit is contained in:
Danny Lin 2022-03-12 20:26:52 -08:00
parent 0058654541
commit 2bcb2ff9a7
No known key found for this signature in database
GPG Key ID: 1988FAA1797EE5AC

View File

@ -4,11 +4,11 @@ package dev.kdrag0n.safetynetriru
object EntryPoint {
@JvmStatic
fun init() {
runCatching {
try {
logDebug("Entry point: Initializing SafetyNet patches")
SecurityHooks.init()
BuildHooks.init()
}.recoverCatching { e ->
} catch (e: Throwable) {
// Throwing an exception would require the JNI code to handle exceptions, so just catch
// everything here.
logDebug("Error in entry point", e)