Commit e7ce2be
fix: use JSONParseWithException for proper error handling
- SQLClient.cpp: Fix bug where RETURN_IF_EXCEPTION after JSONParse would
never trigger on JSON parse failure since JSONParse doesn't throw
- BunString.cpp: Simplify by using JSONParseWithException instead of
manually checking for empty result and throwing
JSONParse returns an empty JSValue on failure without throwing, so
RETURN_IF_EXCEPTION will not catch parsing errors. JSONParseWithException
properly throws a SyntaxError which RETURN_IF_EXCEPTION can catch.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>1 parent 27ff6aa commit e7ce2be
2 files changed
+2
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
473 | 473 | | |
474 | 474 | | |
475 | 475 | | |
476 | | - | |
477 | | - | |
478 | | - | |
479 | | - | |
480 | | - | |
481 | | - | |
| 476 | + | |
482 | 477 | | |
483 | 478 | | |
484 | 479 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
191 | | - | |
| 191 | + | |
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
| |||
0 commit comments