2 ms·
> errors of type (1) are not the purpose of your code. They're problems that prevent your code from fulfilling its purpose. I don't really agree with that. In
by sacado2 11y ago
> errors of type (1) are not the purpose of your code. They're problems that prevent your code from fulfilling its purpose.
I don't really agree with that. In a module that checks whether a user has the right credentials to perform a given task, for instance by checking the used IP is correct and a correct password is given within 3 attempts (or else the account is blocked), dealing with errors (checking password is valid, checking IP is valid, checking account is not blocked, blocking it if needed) is the purpose of the module.
This is the same with any kind of automaton. Knowing when you go into an error state and how you get out of it is part of the problem you deal with.