Go back to Richel Bilderbeek's homepage.
Go back to Richel Bilderbeek's C++ page.
When 'something goes wrong'.
There are multiple types of errors (listed in chronology, except for the misc errors):
- Install errors, when installation fails
- qmake errors, when qmake does something unexpected
- make errors, when make does something unexpected
- Compile errors, emitted by the compiler.
- Link errors, emitted by the linker.
- Runtime errors, emitted during program execution, causing your program to quit
- Misc errors, all other errors
Prefer compile time errors and link time errors to run time errors [2].
Runtime errors are the type of errors that take most time debugging.
At run time, distinguish between errors and non-errors.
- Herb Sutter, Andrei Alexandrescu. C++ coding standards: 101 rules, guidelines, and best practices. ISBN: 0-32-111358-6. Item 70: 'Distinguish between errors and non-errors'.
- Herb Sutter, Andrei Alexandrescu. C++ coding standards: 101 rules, guidelines, and best practices. ISBN: 0-32-111358-6. Item 14: 'Prefer compile- and link-time errors to run-time errors'.
Go back to Richel Bilderbeek's C++ page.
Go back to Richel Bilderbeek's homepage.
