Minor fix

Tried to raise non-exception type as error.