docs: fix stale error-trace output format + markers
The trace docs predated the current formatter. Corrected against the real
output (library/modules/trace.sx to_string + examples/expected/1025-errors-
trace-format.stderr):
- error-handling.md: replace the obsolete trace example ("error trace:" /
"raised error.X" / "at func (file:line)") with the real format —
"error return trace (most recent call last):" + per-frame "func at
file:line:col" + source line + caret.
- debugger.md: drop the stale "(planned)" marker on the trace formatter
(it is implemented); the tag-name table note now cites the failable-main
reporter's "unhandled error reached main: error.X" line, not a
nonexistent "raised error.X" trace line.
This commit is contained in:
@@ -317,11 +317,16 @@ v := parse(s) catch e {
|
||||
```
|
||||
|
||||
```
|
||||
error trace:
|
||||
raised error.BadDigit
|
||||
at parse_digit (parse.sx:12:5)
|
||||
at parse_int (parse.sx:34:13)
|
||||
at handle_line (main.sx:21:8)
|
||||
error return trace (most recent call last):
|
||||
parse_digit at parse.sx:12:5
|
||||
c := s[i] or raise error.BadDigit;
|
||||
^
|
||||
parse_int at parse.sx:34:13
|
||||
try parse_digit(s);
|
||||
^
|
||||
handle_line at main.sx:21:8
|
||||
try parse_int(line);
|
||||
^
|
||||
```
|
||||
|
||||
Traces are on by default in debug builds and compiled out in release
|
||||
|
||||
Reference in New Issue
Block a user