Hi Crypto, On Fri, Feb 20, 2015 at 11:02 PM, Crypto Compress < cryptocompr...@googlemail.com> wrote:
> AssertionExceptions are not intended to be caught, they are intended to be >> seen, in a specific environment. >> > > Joe, your argumentation is around how (not) to use exceptions. I can see > your point and it's valid. > My point is about not to implement exceptions at all. > > If exceptions are not intended to be caught, they don't need to be thrown > (even if the context is different). > If exceptions are not thrown and not caught, we can use "error" in dev and > some easing severity (warning, zero cost nothing) in prod. > > Freely adapted from Murphy: If assertion exception can be catched, it will > be even in production. Assertion is only for development and testing. We need errors or exceptions during development and testing, but not in production. Therefore, errors/exception should not be catched by code in general. Isn't assertion nature? I don't insist not to enable assertion in production environment. There might be software that needs extreme reliability and stability. For these softwares, it makes sense to enable assertions and catch errors/exceptions to do some cleanups. Regards, -- Yasuo Ohgaki yohg...@ohgaki.net