Comment

Comment by aaronjanse

> why am I expecting an error? Shouldn't that keyword be "on_exception" or something?

`expect` takes an input that is either an error or a value, then turns that input into just a value. The provided string is the error message if something goes wrong (i.e. the input was an error).

parent aaronjanse 6 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton