wrapped call to grad_log_prob with try/catch