comparison 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
comparison
equal deleted inserted replaced
1705:a6e27c8e7ef4 1706:93b9fd13a06c
257 mapToList(); 257 mapToList();
258 } 258 }
259 259
260 public Object removeFromList(int pos) throws LuanException { 260 public Object removeFromList(int pos) throws LuanException {
261 checkMutable(); 261 checkMutable();
262 return list().remove(pos-1); 262 try {
263 return list().remove(pos-1);
264 } catch(IndexOutOfBoundsException e) {
265 throw new LuanException("index out of bounds - "+e.getMessage());
266 }
263 } 267 }
264 268
265 public void rawSort(Comparator<Object> cmp) throws LuanException { 269 public void rawSort(Comparator<Object> cmp) throws LuanException {
266 checkMutable(); 270 checkMutable();
267 Collections.sort(list(),cmp); 271 Collections.sort(list(),cmp);