Fixed missing class argument when throwing exception