rethrow exception, refactor default block in fully covered switch statement