Fix expected exception class (related to #338)

This corrects a typo in a66a37aebd7424e9a82e81bd1a3760abb735ea7e.