Reject invalid parameter vector during HMC sampling

Hello !

I am trying to use pymc to do Bayesian inference on ODE models. Yet, those models are such that for some values of the parameters vector, the integration will fail (too stiff/requires more precision than the machine’s…). In stan, there exists a reject statement to indicate that the current sampling point is not valid. Is there anything similar in pymc ? Basically my modeling library throws an exception in this case and I would like to simply catch it and deal with it appropriately.