Minor improvements to exception class.