Use correct exception class.