Skip to content

Commit

Permalink
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 0 additions & 1 deletion spec/truffle/tags/core/kernel/throw_tags.txt

This file was deleted.

3 changes: 3 additions & 0 deletions truffle/src/main/ruby/core/exception.rb
Original file line number Diff line number Diff line change
@@ -165,6 +165,9 @@ def to_s
end
end

class UncaughtThrowError < ArgumentError
end

class IndexError < StandardError
end

2 changes: 1 addition & 1 deletion truffle/src/main/ruby/core/throw_catch.rb
Original file line number Diff line number Diff line change
@@ -60,7 +60,7 @@ def catch(obj = Object.new, &block)

def throw(obj, value=nil)
unless Rubinius::ThrownValue.available? obj
raise ArgumentError, "uncaught throw #{obj.inspect}"
raise UncaughtThrowError, "uncaught throw #{obj.inspect}"
end

Rubinius.throw obj, value

0 comments on commit c944a3e

Please sign in to comment.