Catch exceptions when running piped js.