title: In spring-batch, how can I get the exception when there is a chunk error?
body: <p>Spring batch provides a listener for capturing when a chunk error has occurred (either the @AfterChunkError annotation or the ChunkListener.afterChunkError interface). Both receive the ChunkContext and the API says:</p>
  
  <blockquote>
    <p><strong>Parameters</strong>:</p>
    
    <p><code>context</code> - the chunk context containing the exception that caused the
    underlying rollback.</p>
  </blockquote>
  
  <p>However, I don't see anything on the ChunkContext interface that would get me to the exception. How do I get from the ChunkContext to the relevant exception?</p>