StepExecution allows you to get the most recent exception caught by the batch runtime from application code, but you might actually want the first one (say an ItemReader threw, then the SkipListener threw, you really want the first one. But…is it the first one ever? Could be a long time ago in a long chunk loop. Or just the first on this pass? Need to clearly define when it resets if it does. Not sure it is useful if it doesn't.
StepExecution allows you to get the most recent exception caught by the batch runtime from application code, but you might actually want the first one (say an ItemReader threw, then the SkipListener threw, you really want the first one. But…is it the first one ever? Could be a long time ago in a long chunk loop. Or just the first on this pass? Need to clearly define when it resets if it does. Not sure it is useful if it doesn't.