tools.deploy.shaker: raise a generic "This application died" system-alert instead of quietly crashing and burning in the ui-error-hook for deployed apps with the debugger stripped
parent
0eb6355827
commit
32b42185e6
|
@ -62,6 +62,13 @@ IN: tools.deploy.shaker
|
||||||
run-file
|
run-file
|
||||||
] when ;
|
] 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 ( -- )
|
: strip-libc ( -- )
|
||||||
"libc" vocab [
|
"libc" vocab [
|
||||||
"Stripping manual memory management debug code" show
|
"Stripping manual memory management debug code" show
|
||||||
|
@ -372,10 +379,6 @@ IN: tools.deploy.shaker
|
||||||
compiler.errors:compiler-errors
|
compiler.errors:compiler-errors
|
||||||
continuations:thread-error-hook
|
continuations:thread-error-hook
|
||||||
} %
|
} %
|
||||||
|
|
||||||
deploy-ui? get [
|
|
||||||
"ui-error-hook" "ui.gadgets.worlds" lookup ,
|
|
||||||
] when
|
|
||||||
] when
|
] when
|
||||||
|
|
||||||
"windows-messages" "windows.messages" lookup [ , ] when*
|
"windows-messages" "windows.messages" lookup [ , ] when*
|
||||||
|
@ -529,6 +532,7 @@ SYMBOL: deploy-vocab
|
||||||
strip-call
|
strip-call
|
||||||
strip-cocoa
|
strip-cocoa
|
||||||
strip-debugger
|
strip-debugger
|
||||||
|
strip-ui-error-hook
|
||||||
strip-specialized-arrays
|
strip-specialized-arrays
|
||||||
compute-next-methods
|
compute-next-methods
|
||||||
strip-startup-hooks
|
strip-startup-hooks
|
||||||
|
|
|
@ -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
|
Loading…
Reference in New Issue