Yes and no. That specifically is a C & C++ thing but the general concept you'll learn in a compilers course. If you intimately understand how a compiler works (even just generally), you pick up a really concise understanding of how the errors come about and how they tie back to the language.
Understanding the lexer and the parser explains a lot of common errors (missing/ semicolon or curly bracket) and why they often point to errors in otherwise perfectly correct & unrelated code instead of their source location.
Understanding the compiler itself and how it operates over an AST means that if you get an error regarding a particular set of semantics, you can quickly learn what the implications are and how that maps to your code.
A good example (other than the GP's) is the massive, ugly template or overloading errors. They make sense and explain to you everything the compiler tried to do and how it failed each time it tried. The compiler doesn't know what is wrong and therefore doesn't have a more concise error to give you so it just tells you everything "it knows". From that you can work back and see where what you intended the code to do diverged from what the compiler thought the code did.
So it is a language thing but you build the intuition to pick up those language skills by learning/understanding compilers in general.
That's not so much a compiler thing as it's a language thing. Perhaps even a C (and C++) language thing...
https://en.cppreference.com/w/cpp/language/value_category