Skip to content

Commit

Permalink
Catch UnsatisfiedLinkError (#2128)
Browse files Browse the repository at this point in the history
## Description

Fixes
#2115

The `System.loadLibrary("rnscreens")` can throw an exception that
inherits from the `Error` class instead of the `Exception` class.
  • Loading branch information
piaskowyk authored May 13, 2024
1 parent cd3ebd7 commit 9d31514
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class ScreensModule(private val reactContext: ReactApplicationContext)
} else {
Log.e("[RNScreens]", "Could not install JSI bindings.")
}
} catch (exception: Exception) {
} catch (exception: UnsatisfiedLinkError) {
Log.w("[RNScreens]", "Could not load RNScreens module.")
}
}
Expand Down

0 comments on commit 9d31514

Please sign in to comment.