Working exception-in-output catching