Skip to content

Commit

Permalink
Add codeblocks for example errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Frank Hampus Weslien committed Jul 30, 2023
1 parent 79b87c2 commit b3988bc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,19 @@ So the defaults are nice, but sometimes the easiest way to write a parser is to

Most parsers tell you the row and column of the problem:

```txt
Something went wrong at (4:17)
```

That may be true, but it is not how humans think. It is how text editors think! It would be better to say:

```txt
I found a problem with this list:
[ 1, 23zm5, 3 ]
^
I wanted an integer, like 6 or 90219.
```

Notice that the error messages says `this list`. That is context! That is the language my brain speaks, not rows and columns.

Expand Down

0 comments on commit b3988bc

Please sign in to comment.