Yesterday I posted a question "My attempt to local redefine a command is failing and not sure why" which I really knew the answer to. But I was thrown by the error message I was getting and after failing to figure out on my own what was going on posted a question here. Now this particular error message wasn't that cryptic. And, in retrospect, I should have recognized the error (particularly when defining my macro using \def....).
Nevertheless, there are many times I get errors which bare little resemblance to what's actually going on (such as missing \begin{document} or a complaint about not properly balanced expression even though they are perfectly balanced). Through years of practice, I usually know where to look for even very cryptic messages.
There are numerous posts on this site about debugging, such as How to debug an infinite loop in pdfLaTeX code, or How to go deep and debug the real error?, or How to best debug LaTeX?.
It seems that it would be nice to have consolidated some place a list of errors that may be misleading and suggestions of where to start looking for errors.
So, for example, last night my error was about my macro not matching it's definition. A helpful suggestion would have been to consider whether I passed the parameters correctly to the macro (##1 vs. #1).
Perhaps I should post this on meta instead? Not really sure.
##in any particular way, a more common way to get that is\def\foo2{zzz}...\foo{...}The##error just meant that you were not operating on the tokens that you intended to operate on and so basically you could get any Tex error, just depending on the code in question. – David Carlisle Sep 12 '13 at 16:09memoirmanual. – jon Oct 18 '13 at 14:42