Add accessor methods to get the last exception