Corrected exception throwing

RubyMine highlights incorrect lines (=