is icon indicating copy to clipboard operation
is copied to clipboard

Custom error messages

Open 0x80 opened this issue 2 years ago • 1 comments

I'm so used to writing context-specific error messages that I wonder how others deal with this because custom messages don't seem to be supported in any of the functions.

assert.string(v, `Failed to find a string in this place, instead found value: ${v}`)

Maybe I'm missing something about how or when you apply these assertions. Do you use something different when you want to communicate an error back to the user? The standard messages don't tell you much I think unless you're able to at least read the stack trace.

0x80 avatar Dec 08 '21 07:12 0x80

Is there any chance we can reopen #175 as a solution to this? I just found that PR after having asked in another issue about the same functionality, and the custom message as implemented in that PR would definitely work nicely for me.

ssalka avatar Mar 21 '23 20:03 ssalka