One of the least-appreciated skills in programming is writing anti-frustrating error messages. A good error message should make it self-evident (a) what the user did, (b) what acceptable inputs are, and (c) how to fix the problem. Can determine love or hate for your library.

Feb 22, 2022 · 4:24 PM UTC

245
663
50
8,979
Replying to @gdb
You mean things like "error code: -2" aren't that great???
Replying to @gdb
Learn from M$ mistakes. Errors that bubble up, have nothing to do with the actual reason a process fails.
Replying to @gdb
the documentation too
Replying to @gdb
Started exploring Rust recently, and have been pleasantly surprised by its error messages.
Replying to @gdb
Tell that to the guy who wrote the c++ templates
Replying to @gdb
and no... you dont need error message every start and end of code block. use the debugger in the IDE for that.
Replying to @gdb
I heard someone saying go with C++
Replying to @gdb
Hackers be like ...
GIF
Replying to @gdb
I've spent too much of my life trying to resolve cryptic error messages where critical context and specific info is missing. As a result, I might actually go overboard with my error messages sometimes with a bit TMI now.