Hacker News new | past | comments | ask | show | jobs | submit login

You're misunderstanding...

The whole point is to never run in a broken state.... that path leads to expensive misery.

The point of resetting is to clear out bad state... if the condition has no defined recovery process then you cannot continue safely.

I'm not saying to not handle an error... I'm saying to not attempt recovery from undefined errors.

If you don't know what went wrong, don't attempt to 'handle' it... reset.




The difference is that running in an unknown/broken state is the default when using error codes. Getting into such a state with exception handling typically requires explicit programmer action, such as the "catch everything and ignore it" pattern.


Sorry, that is just wrong headed.

What is needed is true error recovery thought, not syntax that encourages proper to just put in empty exception handlers.

Your point is arguing for error returns in my view.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: