Skip to content

Commit

Permalink
soloader | Catch Throwable within SystemLoadWrapperSoSource instead o…
Browse files Browse the repository at this point in the history
…f Exception.

Summary: The unsatisfied link error is bypassing throw here and gets catched only in SoLoader itself, catch it here so we can return nice result.

Reviewed By: corporateshark

Differential Revision: D66409983

fbshipit-source-id: 0f7ffc68cf08baf49e2dc32a6d5a9f40c2846af8
  • Loading branch information
nlutsenko authored and facebook-github-bot committed Nov 24, 2024
1 parent b5d5476 commit 0a12aa1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion java/com/facebook/soloader/SystemLoadWrapperSoSource.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public int loadLibrary(String soName, int loadFlags, StrictMode.ThreadPolicy thr
throws IOException {
try {
System.loadLibrary(soName.substring("lib".length(), soName.length() - ".so".length()));
} catch (Exception e) {
} catch (Throwable e) {
LogUtil.e(SoLoader.TAG, "Error loading library: " + soName, e);
return LOAD_RESULT_NOT_FOUND;
}
Expand Down

0 comments on commit 0a12aa1

Please sign in to comment.