Add braces around throw statement here. Even if there is a single statement in a block, convention is to explicitly specify the block with braces.