3 ms·
Because distinguishing between types of error is important and useful. A buffer overrun is different from a stack overflow, which is different from a division
by Karellen 3y ago
Because distinguishing between types of error is important and useful.
A buffer overrun is different from a stack overflow, which is different from a division by zero, which is different from "else die()" on unexpected input, which is different from a power failure, which is different from a cosmic-ray bit-flip.
The kinds of problems these errors cause, the kinds of defences you can use to protect against them, and the kinds of reactions you need to have when they occur are different. Using the right name for the type of error you're getting helps categorise it, talk about it, and come up with solutions that are relevant to that problem.