Mercurial Hosting > luan
diff src/luan/lib/IoLib.java @ 130:0594c132888b
cleanup
git-svn-id: https://luan-java.googlecode.com/svn/trunk@131 21e917c8-12df-6dd8-5cb6-c86387c605b9
author | fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9> |
---|---|
date | Tue, 10 Jun 2014 02:43:40 +0000 |
parents | 486a0641bca4 |
children | 3119326260ea |
line wrap: on
line diff
--- a/src/luan/lib/IoLib.java Mon Jun 09 09:16:16 2014 +0000 +++ b/src/luan/lib/IoLib.java Tue Jun 10 02:43:40 2014 +0000 @@ -121,7 +121,7 @@ public void write(LuanState luan,Object... args) throws LuanException { for( Object obj : args ) { - out.print( luan.JAVA.toString(obj) ); + out.print( luan.toString(obj) ); } } @@ -137,7 +137,7 @@ public void write(LuanState luan,Object... args) throws LuanException, IOException { for( Object obj : args ) { - out.write( luan.JAVA.toString(obj) ); + out.write( luan.toString(obj) ); } } @@ -185,7 +185,7 @@ try { if( args.length > 0 ) { if( args.length > 1 || !"close".equals(args[0]) ) - throw luan.JAVA.exception( "the only argument allowed is 'close'" ); + throw luan.exception( "the only argument allowed is 'close'" ); in.close(); return null; } @@ -194,7 +194,7 @@ in.close(); return rtn; } catch(IOException e) { - throw luan.JAVA.exception(e); + throw luan.exception(e); } } }; @@ -208,7 +208,7 @@ try { if( args.length > 0 ) { if( args.length > 1 || !"close".equals(args[0]) ) - throw luan.JAVA.exception( "the only argument allowed is 'close'" ); + throw luan.exception( "the only argument allowed is 'close'" ); in.close(); return null; } @@ -218,7 +218,7 @@ } return a; } catch(IOException e) { - throw luan.JAVA.exception(e); + throw luan.exception(e); } } }; @@ -292,7 +292,7 @@ out.close(); return; } - throw luan.JAVA.exception( "bad argument #1 to 'write' (string or binary expected)" ); + throw luan.exception( "bad argument #1 to 'write' (string or binary expected)" ); } public LuanTable text_writer() throws IOException { @@ -416,13 +416,13 @@ try { if( args.length > 0 ) { if( args.length > 1 || !"close".equals(args[0]) ) - throw luan.JAVA.exception( "the only argument allowed is 'close'" ); + throw luan.exception( "the only argument allowed is 'close'" ); ss.close(); return null; } return new LuanSocket(ss.accept()).table(); } catch(IOException e) { - throw luan.JAVA.exception(e); + throw luan.exception(e); } } };