Stream: ideas

Topic: panic message wording


view this post on Zulip Kevin Gillette (Apr 16 2022 at 16:56):

We have checked functions which can return Err tags like Overflow and DivByZero, and then we have panicking variants which return a plaintext message, like "runtime exception for overflow!" (likely to be refined).

For consistency, why not instead just panic with a message that is (or includes) the name of tag that would've been returned if the checked variant function had been used, for example (proposed, not current behavior):

» Num.addChecked 127i8 1

Err Overflow : Result I8 [ Overflow ]*

» 127i8 + 1
panic: Num.add Overflow

Last updated: Jun 16 2026 at 16:19 UTC