catch script exceptions - escript can't handle them