]> gitweb.factorcode.org Git - factor.git/commitdiff
Remove Cocoa exception handling support since it no longer works
authorSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Tue, 6 Jul 2010 21:48:37 +0000 (17:48 -0400)
committerSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Tue, 6 Jul 2010 21:48:37 +0000 (17:48 -0400)
basis/cocoa/application/application-docs.factor
basis/cocoa/application/application.factor
vm/objects.hpp
vm/os-macosx.mm

index 337cff6f06c145923b0fb036eae18daffeeca6ad..849983d00e6c42abe099434441c79cb94fbfe302 100644 (file)
@@ -36,9 +36,6 @@ HELP: install-delegate
 { $values { "receiver" "an " { $snippet "NSObject" } } { "delegate" "an Objective C class" } }
 { $description "Sets the receiver's delegate to a new instance of the delegate class." } ;
 
-HELP: objc-error
-{ $error-description "Thrown by the Objective C runtime when an error occurs, for example, sending a message to an object with an unrecognized selector." } ;
-
 ARTICLE: "cocoa-application-utils" "Cocoa application utilities"
 "Utilities:"
 { $subsections
index db1eefca14fcdef89c5188c0a1b1a39086284625..b00f39fa1d79e0bb339ecf9dd36226fe799e42eb 100644 (file)
@@ -1,4 +1,4 @@
-! Copyright (C) 2006, 2008 Slava Pestov
+! Copyright (C) 2006, 2010 Slava Pestov
 ! See http://factorcode.org/license.txt for BSD license.
 USING: alien alien.syntax io kernel namespaces core-foundation
 core-foundation.strings cocoa.messages cocoa cocoa.classes
@@ -40,16 +40,6 @@ FUNCTION: void NSBeep ( ) ;
 : install-delegate ( receiver delegate -- )
     -> alloc -> init -> setDelegate: ;
 
-TUPLE: objc-error alien reason ;
-
-: objc-error ( alien -- * )
-    dup -> reason CF>string \ objc-error boa throw ;
-
-M: objc-error summary ( error -- )
-    drop "Objective C exception" ;
-
-[ [ objc-error ] 19 set-special-object ] "cocoa.application" add-startup-hook
-
 : running.app? ( -- ? )
     #! Test if we're running a .app.
     ".app"
index 778df8642e6ff519dce79f564e02827a5be951dc..8d883ecdb71964f43376b946f2ca4d089fb83560 100644 (file)
@@ -26,8 +26,6 @@ enum special_object {
        OBJ_YIELD_CALLBACK,        /* used when Factor is embedded in a C app */
        OBJ_SLEEP_CALLBACK,        /* used when Factor is embedded in a C app */
 
-       OBJ_COCOA_EXCEPTION = 19,  /* Cocoa exception handler quotation */
-
        OBJ_STARTUP_QUOT = 20,     /* startup quotation */
        OBJ_GLOBAL,                /* global namespace */
        OBJ_SHUTDOWN_QUOT,         /* shutdown quotation */
index 05a9aef5c8c665aaa743ae101437aea8c636dd7b..c5377be8ef7a591e1041b6ce203a6fee979004bd 100644 (file)
@@ -8,23 +8,7 @@ namespace factor
 
 void factor_vm::c_to_factor_toplevel(cell quot)
 {
-       for(;;)
-       {
-NS_DURING
-               c_to_factor(quot);
-               NS_VOIDRETURN;
-NS_HANDLER
-               ctx->push(allot_alien(false_object,(cell)localException));
-               quot = special_objects[OBJ_COCOA_EXCEPTION];
-               if(!tagged<object>(quot).type_p(QUOTATION_TYPE))
-               {
-                       /* No Cocoa exception handler was registered, so
-                       basis/cocoa/ is not loaded. So we pass the exception
-                       along. */
-                       [localException raise];
-               }
-NS_ENDHANDLER
-       }
+       c_to_factor(quot);
 }
 
 void early_init(void)