Commit f9f29e7
authored
Android: improve error diagnostics for LlmModule and exceptions (pytorch#19092)
Add cause-chaining constructor to ExecutorchRuntimeException so wrapped
exceptions preserve the original cause in the stack trace.
Restore detailed native error messages in LlmModule.load() — the null
runner case now reports the model_type_category and valid values instead
of a generic message. Load failures now throw from JNI with the specific
error code and description.
This commit was authored with the help of Claude.1 parent 7b5dcc1 commit f9f29e7
2 files changed
Lines changed: 15 additions & 11 deletions
File tree
- extension/android
- executorch_android/src/main/java/org/pytorch/executorch
- jni
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
164 | 169 | | |
165 | 170 | | |
166 | 171 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
594 | 595 | | |
595 | 596 | | |
596 | 597 | | |
597 | | - | |
598 | | - | |
599 | | - | |
600 | | - | |
601 | | - | |
602 | | - | |
603 | | - | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
604 | 605 | | |
605 | 606 | | |
606 | 607 | | |
607 | 608 | | |
608 | | - | |
609 | | - | |
610 | | - | |
611 | | - | |
| 609 | + | |
| 610 | + | |
612 | 611 | | |
613 | 612 | | |
614 | 613 | | |
| |||
0 commit comments