|
@@ -107,6 +107,63 @@ return global;
|
|
|
}; }),
|
|
|
$globals.NodePlatform);
|
|
|
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
+selector: "initialize",
|
|
|
+protocol: "initialization",
|
|
|
+
|
|
|
+args: [],
|
|
|
+source: "initialize\x0a\x09process\x0a\x09\x09on: 'uncaughtException'\x0a\x09\x09do: [ :err | ErrorHandler handleError: err. process exit: 1 ];\x0a\x09\x09on: 'unhandledRejection'\x0a\x09\x09do: [ :err | ErrorHandler handleError: err. process exit: 2 ]",
|
|
|
+referencedClasses: ["ErrorHandler"],
|
|
|
+
|
|
|
+pragmas: [],
|
|
|
+messageSends: ["on:do:", "handleError:", "exit:"]
|
|
|
+}, function ($methodClass){ return function (){
|
|
|
+var self=this,$self=this;
|
|
|
+
|
|
|
+return $core.withContext(function($ctx1) {
|
|
|
+
|
|
|
+var $1;
|
|
|
+$1=process;
|
|
|
+[$recv($1)._on_do_("uncaughtException",(function(err){
|
|
|
+
|
|
|
+return $core.withContext(function($ctx2) {
|
|
|
+
|
|
|
+[$recv($globals.ErrorHandler)._handleError_(err)
|
|
|
+
|
|
|
+,$ctx2.sendIdx["handleError:"]=1
|
|
|
+
|
|
|
+][0];
|
|
|
+return [$recv(process)._exit_((1))
|
|
|
+
|
|
|
+,$ctx2.sendIdx["exit:"]=1
|
|
|
+
|
|
|
+][0];
|
|
|
+
|
|
|
+}, function($ctx2) {$ctx2.fillBlock({err:err},$ctx1,1)});
|
|
|
+
|
|
|
+}))
|
|
|
+
|
|
|
+,$ctx1.sendIdx["on:do:"]=1
|
|
|
+
|
|
|
+][0];
|
|
|
+$recv($1)._on_do_("unhandledRejection",(function(err){
|
|
|
+
|
|
|
+return $core.withContext(function($ctx2) {
|
|
|
+
|
|
|
+$recv($globals.ErrorHandler)._handleError_(err);
|
|
|
+return $recv(process)._exit_((2));
|
|
|
+
|
|
|
+}, function($ctx2) {$ctx2.fillBlock({err:err},$ctx1,2)});
|
|
|
+
|
|
|
+}));
|
|
|
+return self;
|
|
|
+
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"initialize",{})});
|
|
|
+
|
|
|
+}; }),
|
|
|
+$globals.NodePlatform);
|
|
|
+
|
|
|
$core.addMethod(
|
|
|
$core.method({
|
|
|
selector: "newXhr",
|