make catch_error method name customizable