3 ms·
“Failed to open %s: %s”, fn, strerror(errno)) Adapt to your own language. Don’t make your users hate you by having to resort to strace. And I love me some str
by rachelbythebay 7y ago
“Failed to open %s: %s”, fn, strerror(errno))
Adapt to your own language. Don’t make your users hate you by having to resort to strace.
And I love me some strace. I just enjoy NOT needing it even more.
- Shish2k 7y agoAmen to that. I wonder how good the signal-noise ratio would be on a lint rule to specify "error messages may not be static strings, you need at least one variable" :P (Maybe not for strictly resource constrained systems - but for something like python, it just seems lazy to `raise Exception("Failed to connect")` without saying what you're trying to connect to or what the error is...)