Handle proper exception class. Closes #1245.