153 reputation
6
bio website janturon.cz
location Czech Republic
age 34
visits member for 3 years, 4 months
seen Nov 2 at 12:31

I'm a teacher at technical high school Písek, enthusiastic about mentoring, software engineering, swimming, donquijoting, kayaking, My Little Pony and most metal genres.


Jul
26
comment Is onError handler better than exceptions?
@PaulEquis: I want to avoid when (and only when) it is reasonable. For instance, JavaScript throws exceptions when handling IE filters (see my post here). And it uses this attitude, there is image.onerror handler without exception. Good point that caller knows more than calee.
Jul
26
comment Is onError handler better than exceptions?
@PaulEquis: Yes, throw e; is indirect try-catch, but it is optional behavior and this is the point. I admit THIS should be the default behavior, not silent swalowing. Would it be acceptable now?
Jul
26
comment Is onError handler better than exceptions?
I was inspired by this link. I admit silent swallow approach may not be proper solution, but frankly, often IT IS. If I would be your colleague and you would like to use my code with standard exception behavior, I would define onError handler as throw e; for you. Could it be?