]> gitweb.factorcode.org Git - factor.git/commitdiff
tools.deploy.shaker: raise a generic "This application died" system-alert instead...
authorJoe Groff <arcata@gmail.com>
Wed, 24 Feb 2010 04:42:36 +0000 (20:42 -0800)
committerJoe Groff <arcata@gmail.com>
Wed, 24 Feb 2010 04:42:36 +0000 (20:42 -0800)
basis/tools/deploy/shaker/shaker.factor
basis/tools/deploy/shaker/strip-ui-error-hook.factor [new file with mode: 0644]

index 09219a8e5e7612caf4ae17b3ced2c83e3af4b519..9a5f89fae035a0072e55c0e39c7bbce30d2e7e8a 100755 (executable)
@@ -62,6 +62,13 @@ IN: tools.deploy.shaker
         run-file
     ] when ;
 
+: strip-ui-error-hook ( -- )
+    strip-debugger? deploy-ui? get and "ui" vocab and [
+        "Installing generic UI error hook" show
+        "vocab:tools/deploy/shaker/strip-ui-error-hook.factor"
+        run-file
+    ] when ;
+
 : strip-libc ( -- )
     "libc" vocab [
         "Stripping manual memory management debug code" show
@@ -372,10 +379,6 @@ IN: tools.deploy.shaker
                 compiler.errors:compiler-errors
                 continuations:thread-error-hook
             } %
-            
-            deploy-ui? get [
-                "ui-error-hook" "ui.gadgets.worlds" lookup ,
-            ] when
         ] when
 
         "windows-messages" "windows.messages" lookup [ , ] when*
@@ -529,6 +532,7 @@ SYMBOL: deploy-vocab
     strip-call
     strip-cocoa
     strip-debugger
+    strip-ui-error-hook
     strip-specialized-arrays
     compute-next-methods
     strip-startup-hooks
diff --git a/basis/tools/deploy/shaker/strip-ui-error-hook.factor b/basis/tools/deploy/shaker/strip-ui-error-hook.factor
new file mode 100644 (file)
index 0000000..2525145
--- /dev/null
@@ -0,0 +1,7 @@
+USING: namespaces tools.deploy.config fry sequences system kernel ui ui.gadgets.worlds ;
+
+deploy-name get "Factor" or '[
+    _ " encountered an unhandled error." append
+    "The application will now exit."
+    system-alert die
+] ui-error-hook set-global