Catch errors in the transform() call.