call raise_error on a proc object