Browse Source

fixes boot.js `wrappedError()`

Nicolas Petton 11 years ago
parent
commit
7516c9c39d
1 changed files with 2 additions and 2 deletions
  1. 2 2
      support/boot.js

+ 2 - 2
support/boot.js

@@ -907,12 +907,12 @@ function RuntimeBrik(brikz, st) {
 	 avoid another RangeError later when the stack is manipulated. */
 	function wrappedError(error) {
 		var errorWrapper = st.JavaScriptException._on_(error);
+		// Add the error to the context, so it is visible in the stack
+		try { errorWrapper._signal(); } catch (ex) {}
 		var context = st.getThisContext();
 		if(isRangeError(error)) {
 			stubContextStack(context);
 		}
-		// Set the error to signaled state in the Smalltalk-side
-		try { errorWrapper._signal(); } catch (ex) {}
 		errorWrapper._context_(context);
 		return errorWrapper;
 	}