浏览代码

use toString if reverse fails.

Nicolas Cannasse 19 年之前
父节点
当前提交
0112db75a4
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      std/neko/io/Socket.hx

+ 1 - 1
std/neko/io/Socket.hx

@@ -68,7 +68,7 @@ class Socket {
 			socket_connect(__s, host, port);
 		} catch( s : String ) {
 			if( s == "std@socket_connect" )
-				throw "Failed to connect on "+reverse(host)+":"+port;
+				throw "Failed to connect on "+(try reverse(host) catch( e : Dynamic ) hostToString(host))+":"+port;
 			else
 				neko.Lib.rethrow(s);
 		}