remove unreachable code.
properly raise exception.