change uses of throw to raise

'throw' is for escaping from control flow, whereas 'raise' is for
error conditions, e.g.

http://rubylearning.com/blog/2011/07/12/throw-catch-raise-rescue-im-so-confused/