mirror of
https://github.com/ruuda/rcl.git
synced 2025-12-23 04:47:19 +00:00
This doesn't swallow important parts of the error (like it did before). It is verbose, but I think this is friendlier than not explaining where a call comes from. It also elegantly solves the String.parse_int error reporting problem.
14 lines
261 B
Text
14 lines
261 B
Text
"0xbadbeef".parse_int()
|
|
|
|
# output:
|
|
stdin:1:1
|
|
╷
|
|
1 │ "0xbadbeef".parse_int()
|
|
╵ ^~~~~~~~~~~
|
|
Error: Failed to parse as integer: "0xbadbeef"
|
|
|
|
stdin:1:22
|
|
╷
|
|
1 │ "0xbadbeef".parse_int()
|
|
╵ ^
|
|
In call to method 'String.parse_int'.
|