Removed the superflous ForceAbort exception.

This commit is contained in:
Peter Camilleri 2015-02-08 19:24:54 -05:00
parent 36e55aaea3
commit b4d8af4199
5 changed files with 2 additions and 10 deletions

View file

@ -59,7 +59,7 @@ module XfOOrth
elsif (value = word.to_foorth_n)
token << "vm.push(#{value.foorth_embed}); "
else
abort("?#{word}?")
error "?#{word}?"
end
end
end

View file

@ -11,6 +11,4 @@ module XfOOrth
#The exception raised to silently force the fOOrth language system to exit.
class SilentExit < StandardError; end
#The exception raised to force the fOOrth language system to abort execution.
class ForceAbort < StandardError; end
end

View file

@ -30,7 +30,7 @@ module XfOOrth
rescue ZeroDivisionError
vm.display_abort("Error: Division by zero.")
rescue XfOOrthError, ForceAbort => error
rescue XfOOrthError => error
vm.display_abort(error)
end

View file

@ -28,11 +28,6 @@ class Object
fail XfOOrth::XfOOrthError, msg, caller
end
#Raise an abort exception with message.
def abort(msg)
raise XfOOrth::ForceAbort, msg
end
#Argument coercion methods. These are stubs.
#Coerce the argument to match my type. Stub

View file

@ -38,7 +38,6 @@ class ObjectMonkeyPatchTester < MiniTest::Unit::TestCase
#Test the quick fail raise in fOOrth.
def test_that_exceptions_are_easy_to_raise
assert_raises(XfOOrth::XfOOrthError) { error('Failure IS an option!') }
assert_raises(XfOOrth::ForceAbort) { abort('Aborting execution!') }
end
def test_mnmx_gt