1
0
Преглед на файлове

Reverted DebugErrorHandler >> handleError:

Nicolas Petton преди 12 години
родител
ревизия
6079f6aba5
променени са 3 файла, в които са добавени 18 реда и са изтрити 7 реда
  1. 6 1
      js/IDE.deploy.js
  2. 9 4
      js/IDE.js
  3. 3 2
      st/IDE.st

+ 6 - 1
js/IDE.deploy.js

@@ -325,9 +325,14 @@ selector: "handleError:",
 fn: function (anError){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
var $1,$2;
-$1=_st((smalltalk.Debugger || Debugger))._new();
+_st((function(){
+return smalltalk.withContext(function($ctx2) { 
$1=_st((smalltalk.Debugger || Debugger))._new();
 _st($1)._error_(anError);
 $2=_st($1)._open();
+return $2;
+})}))._on_do_((smalltalk.Error || Error),(function(error){
+return smalltalk.withContext(function($ctx2) { 
return _st(_st((smalltalk.ErrorHandler || ErrorHandler))._new())._handleError_(error);
+})}));
 return self}, self, "handleError:", [anError], smalltalk.DebugErrorHandler)}
 }),
 smalltalk.DebugErrorHandler);

+ 9 - 4
js/IDE.js

@@ -426,14 +426,19 @@ category: 'error handling',
 fn: function (anError){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
var $1,$2;
-$1=_st((smalltalk.Debugger || Debugger))._new();
+_st((function(){
+return smalltalk.withContext(function($ctx2) { 
$1=_st((smalltalk.Debugger || Debugger))._new();
 _st($1)._error_(anError);
 $2=_st($1)._open();
+return $2;
+})}))._on_do_((smalltalk.Error || Error),(function(error){
+return smalltalk.withContext(function($ctx2) { 
return _st(_st((smalltalk.ErrorHandler || ErrorHandler))._new())._handleError_(error);
+})}));
 return self}, self, "handleError:", [anError], smalltalk.DebugErrorHandler)},
 args: ["anError"],
-source: "handleError: anError\x0a\x09Debugger new\x0a\x09\x09error: anError;\x0a\x09\x09open",
-messageSends: ["error:", "new", "open"],
-referencedClasses: ["Debugger"]
+source: "handleError: anError\x0a\x09[ Debugger new\x0a\x09\x09error: anError;\x0a\x09\x09open ] on: Error do: [ :error |\x0a\x09\x09\x09ErrorHandler new handleError: error ]",
+messageSends: ["on:do:", "handleError:", "new", "error:", "open"],
+referencedClasses: ["Error", "ErrorHandler", "Debugger"]
 }),
 smalltalk.DebugErrorHandler);
 

+ 3 - 2
st/IDE.st

@@ -156,9 +156,10 @@ ErrorHandler subclass: #DebugErrorHandler
 !DebugErrorHandler methodsFor: 'error handling'!
 
 handleError: anError
-	Debugger new
+	[ Debugger new
 		error: anError;
-		open
+		open ] on: Error do: [ :error |
+			ErrorHandler new handleError: error ]
 ! !
 
 !DebugErrorHandler class methodsFor: 'initialization'!