Browse Source

use toString if reverse fails.

Nicolas Cannasse 19 years ago
parent
commit
0112db75a4
1 changed files with 1 additions and 1 deletions
  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);
 		}