Nicolas Cannasse 18 роки тому
батько
коміт
4def5bb506
2 змінених файлів з 4 додано та 2 видалено
  1. 1 0
      doc/CHANGES.txt
  2. 3 2
      std/haxe/remoting/SocketProtocol.hx

+ 1 - 0
doc/CHANGES.txt

@@ -16,6 +16,7 @@
 	fixed F9 with uninitialized integer registers
 	fixed F9 + operator with Dynamic/Null operands
 	added Enum subtyping
+	fix with remoting threadserver and exceptions
 
 2007-07-25: 1.14
 	fixed no error when invalid "catch" expression

+ 3 - 2
std/haxe/remoting/SocketProtocol.hx

@@ -175,11 +175,12 @@ class SocketProtocol {
 		} catch( e : Dynamic ) {
 			result = e;
 			isException = true;
-			if( onError != null )
-				onError(path,fname,args,e);
 		}
 		// send back result/exception over network
 		sendAnswer(result,isException);
+		// send the error event
+		if( isException && onError != null )
+			onError(path,fname,args,result);
 	}
 
 	public function processAnswer( data : String ) : Dynamic {