Przeglądaj źródła

just test we cn catch Socket.connect() error #8336

Aleksandr Kuzmenko 6 lat temu
rodzic
commit
a7904f0226

+ 1 - 1
tests/misc/projects/Issue8336/Main.hx

@@ -9,7 +9,7 @@ class Main {
 		try {
 			new sys.net.Socket().connect(new sys.net.Host("127.0.0.1"), 9999);
 		} catch(e:String) {
-			haxe.macro.Context.error(e, (macro {}).pos);
+			haxe.macro.Context.error('connection error', (macro {}).pos);
 		}
 		return macro {}
 	}

+ 1 - 1
tests/misc/projects/Issue8336/compile-fail.hxml.stderr

@@ -1 +1 @@
-Main.hx:12: characters 39-41 : Connection refused(connect, )
+Main.hx:12: characters 56-58 : connection error