Fix incorrect exception syntax

Closes #36.