Mercurial Hosting > luan
diff src/luan/modules/IoLuan.java @ 1509:0ba144491a42
lucene.backup zip
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Sun, 17 May 2020 14:29:33 -0600 |
parents | 86c5e7000ecf |
children | b89212fd04b5 |
line wrap: on
line diff
--- a/src/luan/modules/IoLuan.java Sat May 16 17:56:02 2020 -0600 +++ b/src/luan/modules/IoLuan.java Sun May 17 14:29:33 2020 -0600 @@ -170,7 +170,7 @@ public String read_text() throws IOException, LuanException { Reader in = reader(); - String s = Utils.readAll(in); + String s = IoUtils.readAll(in); return s; } @@ -232,7 +232,7 @@ } @Override public String read_text() throws IOException { - return Utils.readAll(new InputStreamReader(System.in)); + return IoUtils.readAll(new InputStreamReader(System.in)); } @Override public byte[] read_binary() throws IOException { @@ -567,20 +567,9 @@ } public void wait_for() - throws IOException, LuanException + throws IOException { - try { - proc.waitFor(); - } catch(InterruptedException e) { - throw new RuntimeException(e); - } - int exitVal = proc.exitValue(); - if( exitVal != 0 ) { - Reader err = new InputStreamReader(proc.getErrorStream()); - String error = "exit value "+exitVal+" in: "+cmd+"\n"+Utils.readAll(err); - err.close(); - throw new LuanException(error); - } + IoUtils.waitFor(proc); } @Override public String read_text() throws IOException, LuanException {