Writing seriously verbose exception text for every single exception thrown may be annoying and space-taking, but after all the crazy things I’ve seen, I wouldn’t do without it. Include what you were expecting, what you encountered, and where you are.
It’s funny you say that, I once figured out a problem for someone by diagnosing an error message with C++ templates. Wizardry! However, the “base” of the error message looked roughly like
error: unknown type "boost::python::specify_a_return_value_policy_to_wrap_functions_returning<Foo>"
Cryptic, right? It turns out he needed to specify a return value policy in order to wrap a function returning Foo. All I did for him was scan past junk visually looking for anything readable or the word “error”.
That’s the general algorithm of reading STL error messages. I still can’t get why people look at you as if you were a wizard, if all that you need to do is to quickly filter out irrelevant 90% of the message. Simple pattern matching exercise.
If you can figure out the problem from a syntax error message with C++ templates, your contribution is certainly far from trivial!
I’m sure that is true, but the error messages I am talking about are ones I designed to contain all the information needed to fix the problem.
Writing seriously verbose exception text for every single exception thrown may be annoying and space-taking, but after all the crazy things I’ve seen, I wouldn’t do without it. Include what you were expecting, what you encountered, and where you are.
It’s funny you say that, I once figured out a problem for someone by diagnosing an error message with C++ templates. Wizardry! However, the “base” of the error message looked roughly like
Cryptic, right? It turns out he needed to specify a return value policy in order to wrap a function returning Foo. All I did for him was scan past junk visually looking for anything readable or the word “error”.
That’s the general algorithm of reading STL error messages. I still can’t get why people look at you as if you were a wizard, if all that you need to do is to quickly filter out irrelevant 90% of the message. Simple pattern matching exercise.