Catch errors with domains