diff core/src/luan/modules/IoLuan.java @ 743:2c41f2aec92f

improve Rpc and implement rpc call for local webserver
author Franklin Schmidt <fschmidt@gmail.com>
date Wed, 13 Jul 2016 17:27:35 -0600
parents f8a7cc1fd3f6
children 4b8695f1cfc4
line wrap: on
line diff
--- a/core/src/luan/modules/IoLuan.java	Tue Jul 12 17:47:30 2016 -0600
+++ b/core/src/luan/modules/IoLuan.java	Wed Jul 13 17:27:35 2016 -0600
@@ -618,11 +618,15 @@
 	public static final class LuanSocket extends LuanIO {
 		private final Socket socket;
 
-		private LuanSocket(String host,int port) throws IOException {
-			this(new Socket(host,port));
+		private LuanSocket(String host,int port) throws LuanException {
+			try {
+				this.socket = new Socket(host,port);
+			} catch(IOException e) {
+				throw new LuanException(e.toString());
+			}
 		}
 
-		private LuanSocket(Socket socket) throws IOException {
+		private LuanSocket(Socket socket) {
 			this.socket = socket;
 		}