Commit 41c43c0
Name the culprit when callbacks raise; alias Response#body to data
Two error-visibility gaps found while dogfooding:
Event handlers re-raise into the JS bridge, where the console shows
"Callback <id>: ArgumentError: ..." with no component or handler name.
bind_events now prints "[Funicular] SomeComponent#handler (onclick)
raised ..." first, so arity mistakes (def handler vs def
handler(event)) are findable at a glance.
HTTP response callbacks are worse: an exception out of the caller's
block (settled == true) re-raises into the bridge and can vanish
entirely. Six storefront components written against `response.body`
froze on their loading state with no output at all. The re-raise now
prints "[Funicular::HTTP] GET /api/... callback raised NoMethodError:
..." first -- and Response gains `body` as an alias of `data`, since
that is what every mainstream HTTP client calls the payload.
The mrblib changes reach browsers with the next picoruby.wasm rebuild;
the SSR (CRuby) side and the new minitest coverage are live now.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>1 parent 51ebffb commit 41c43c0
3 files changed
Lines changed: 77 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
656 | 656 | | |
657 | 657 | | |
658 | 658 | | |
| 659 | + | |
659 | 660 | | |
660 | 661 | | |
661 | 662 | | |
| |||
672 | 673 | | |
673 | 674 | | |
674 | 675 | | |
| 676 | + | |
675 | 677 | | |
676 | 678 | | |
677 | 679 | | |
| |||
688 | 690 | | |
689 | 691 | | |
690 | 692 | | |
| 693 | + | |
691 | 694 | | |
692 | 695 | | |
693 | 696 | | |
| |||
720 | 723 | | |
721 | 724 | | |
722 | 725 | | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
723 | 738 | | |
724 | 739 | | |
725 | 740 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
6 | 10 | | |
7 | 11 | | |
8 | 12 | | |
| |||
125 | 129 | | |
126 | 130 | | |
127 | 131 | | |
128 | | - | |
129 | | - | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
130 | 142 | | |
131 | 143 | | |
132 | 144 | | |
| |||
0 commit comments