Comment by mckirk

Comment by mckirk 2 hours ago

2 replies

I generally do this via a `throw UnsupportedValueError(value)`, where the exception constructor only accepts a `never`. That way I have both a compile time check as well as an error at runtime, if anything weird happens and there's an unexpected value.

mquander an hour ago

That's great, I'm going to use that one in the future.