Mercurial Hosting > luan
diff src/luan/LuanTable.java @ 1706:93b9fd13a06c
Luan.arg fix
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Mon, 04 Jul 2022 12:30:16 -0600 |
parents | a37ffe2d1b14 |
children | 8d257d56dc42 |
line wrap: on
line diff
--- a/src/luan/LuanTable.java Sun Jul 03 21:59:38 2022 -0600 +++ b/src/luan/LuanTable.java Mon Jul 04 12:30:16 2022 -0600 @@ -259,7 +259,11 @@ public Object removeFromList(int pos) throws LuanException { checkMutable(); - return list().remove(pos-1); + try { + return list().remove(pos-1); + } catch(IndexOutOfBoundsException e) { + throw new LuanException("index out of bounds - "+e.getMessage()); + } } public void rawSort(Comparator<Object> cmp) throws LuanException {