code: public void registerThrowable(RetryContext context, Throwable throwable) {
  		((NeverRetryContext) context).setFinished();
  		((RetryContextSupport) context).registerThrowable(throwable);
  	}
docs: Make the throwable available for downstream use through the context.
  @see org.springframework.retry.RetryPolicy#registerThrowable(org.springframework.retry.RetryContext,
  Throwable)