-
Notifications
You must be signed in to change notification settings - Fork 922
Android: unified error reporting — all sync errors throw, no silent f… #18669
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
65e793b
4338e13
e734382
28241aa
795e56c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -46,5 +46,11 @@ default void onStats(String stats) {} | |
| * @param message Human-readable error description | ||
| */ | ||
| @DoNotStrip | ||
| default void onError(int errorCode, String message) {} | ||
| default void onError(int errorCode, String message) { | ||
| try { | ||
| android.util.Log.e("ExecuTorch", "LLM error " + errorCode + ": " + message); | ||
| } catch (Throwable t) { | ||
| System.err.println("ExecuTorch LLM error " + errorCode + ": " + message); | ||
| } | ||
|
Comment on lines
+49
to
+54
|
||
| } | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After destroy(), forward()/execute() now throw IllegalStateException. This assertion uses the broad RuntimeException type, which could hide regressions. Prefer asserting IllegalStateException specifically (and optionally validate the message).