4 ms·
If you detect something that can not (well, should not) ever happen, it means that state of the process is no longer within designed bounds. The process' outpu
by forgottenpass 10y ago
If you detect something that can not (well, should not) ever happen, it means that state of the process is no longer within designed bounds.
The process' output can not be trusted, so it should stop processing. Detecting something you never expect to happen is almost tautologically stating the software doesn't know how to recover state.
This, of course, relies on an architecture where another process will take care of making sure an error is bubbled to the place it needs to go, pulling failsafe, etc... I will grant some environments and/or designs make this easier than others (eg. Erlang's error handling is all about letting processes die).