Correct exception throwing

RubyMine highlights incorrect lines (=