Exceptions created but not thrown

Picked these up in a findbugs scan. Thought they might be worth fixing.