Improvements in spark exception class.