Skip to content

Commit

Permalink
log exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
cafeed28 committed Feb 29, 2024
1 parent 37cad43 commit db447a2
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ android {
applicationId 'com.cafeed28.omori'
minSdk 26
targetSdk 34
versionCode 6
versionName '1.2.2'
versionCode 7
versionName '1.2.3'
}

buildTypes {
Expand Down
4 changes: 4 additions & 0 deletions app/src/main/java/com/cafeed28/omori/NwCompat.java
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ public String fsReadFile(String path) {
return mEncoder.encodeToString(bytes);
} catch (IOException e) {
if (!(e instanceof NoSuchFileException)) {
Debug.i().log(Log.ERROR, e.toString());
e.printStackTrace();
}
return null;
Expand All @@ -127,6 +128,7 @@ public void fsWriteFile(String path, byte[] data) {
try {
Files.write(Paths.get(path), data);
} catch (IOException e) {
Debug.i().log(Log.ERROR, e.toString());
e.printStackTrace();
}
}
Expand All @@ -136,6 +138,7 @@ public void fsUnlink(String path) {
try {
Files.deleteIfExists(Paths.get(path));
} catch (IOException e) {
Debug.i().log(Log.ERROR, e.toString());
e.printStackTrace();
}
}
Expand All @@ -145,6 +148,7 @@ public void fsRename(String path, String newPath) {
try {
Files.move(Paths.get(path), Paths.get(newPath));
} catch (IOException e) {
Debug.i().log(Log.ERROR, e.toString());
e.printStackTrace();
}
}
Expand Down
3 changes: 3 additions & 0 deletions app/src/main/java/com/cafeed28/omori/NwCompatPathHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ private InputStream handleGame(String path) {
return Files.newInputStream(Paths.get(mDirectory, path));
} catch (IOException e) {
if (!(e instanceof NoSuchFileException)) {
Debug.i().log(Log.ERROR, e.toString());
e.printStackTrace();
}
}
Expand All @@ -66,6 +67,7 @@ private InputStream handleAsset(String path) {
is = Files.newInputStream(Paths.get(mDirectory, "assets", path));
} catch (IOException e) {
if (!(e instanceof NoSuchFileException)) {
Debug.i().log(Log.ERROR, e.toString());
e.printStackTrace();
}
}
Expand All @@ -76,6 +78,7 @@ private InputStream handleAsset(String path) {
is = mActivity.getAssets().open(path);
} catch (IOException e) {
if (!(e instanceof FileNotFoundException)) {
Debug.i().log(Log.ERROR, e.toString());
e.printStackTrace();
}
}
Expand Down
1 change: 1 addition & 0 deletions app/src/main/java/com/cafeed28/omori/WebViewHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ public WebResourceResponse shouldInterceptRequest(WebView view, WebResourceReque

return mPathHandler.handle(path, mOneLoader);
} catch (Exception e) {
Debug.i().log(Log.ERROR, e.toString());
e.printStackTrace();
return null;
}
Expand Down

0 comments on commit db447a2

Please sign in to comment.