I see where this comes from, but it still is evil to perform a side-effect in the expression calculating a `val`. I think I would prefer a `var errorEvent` in this case.