diff --git a/lib/fOOrth/compiler/process.rb b/lib/fOOrth/compiler/process.rb index 9507cfb..f8f4d67 100644 --- a/lib/fOOrth/compiler/process.rb +++ b/lib/fOOrth/compiler/process.rb @@ -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 diff --git a/lib/fOOrth/exceptions.rb b/lib/fOOrth/exceptions.rb index 45ee403..ffc8b5a 100644 --- a/lib/fOOrth/exceptions.rb +++ b/lib/fOOrth/exceptions.rb @@ -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 \ No newline at end of file diff --git a/lib/fOOrth/main.rb b/lib/fOOrth/main.rb index 5f8f658..f456943 100644 --- a/lib/fOOrth/main.rb +++ b/lib/fOOrth/main.rb @@ -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 diff --git a/lib/fOOrth/monkey_patch/object.rb b/lib/fOOrth/monkey_patch/object.rb index 6c27b19..d33fded 100644 --- a/lib/fOOrth/monkey_patch/object.rb +++ b/lib/fOOrth/monkey_patch/object.rb @@ -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 diff --git a/tests/monkey_patch/object_test.rb b/tests/monkey_patch/object_test.rb index f565365..e49ba38 100644 --- a/tests/monkey_patch/object_test.rb +++ b/tests/monkey_patch/object_test.rb @@ -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