Difference between Bugs and Errors
An error or exception is raised when something bad happens, but as long as our code handles it as users expect it to, it’s not a bug. A bug is when code behaves in ways our users don’t expect it to.
Bugs
- Unexpected: crashing
- they need to be fixed
Error
- Expected and handled: e.g. internet connection lost
- if an error happens and is not handled, then it IS a bug; the bug is that the error is not being handled.
References
#computer_science #handle #boot_dev #errors #programming #crash #bugs