Catch script runtime exception