Pass exception to args_for_retry

I needed the exception class to determine what I want to put on the args. The code I added should be backwards compat with someone who implemented it the old way