Unreachable code fixes (reported by cppcheck).
Merge pull request #181 from logzero/throw

Unreachable code fixes.