Fix raise error from io.lines and file:lines.

This commit is contained in:
Enyby
2019-10-07 14:52:12 +03:00
parent f9f78b81da
commit a50deaa75c

View File

@@ -327,6 +327,10 @@ public class IoLib extends TwoArgFunction {
case LINES_ITER: return iolib._lines_iter(f, toclose, this.args); case LINES_ITER: return iolib._lines_iter(f, toclose, this.args);
} }
} catch ( IOException ioe ) { } catch ( IOException ioe ) {
if (opcode == LINES_ITER) {
String s = ioe.getMessage();
error(s != null ? s : ioe.toString());
}
return errorresult(ioe); return errorresult(ioe);
} }
return NONE; return NONE;