Mercurial Hosting > luan
comparison core/src/luan/LuanTable.java @ 510:2da0bcb979b5
better error messages
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Fri, 22 May 2015 02:28:15 -0600 |
parents | e3b0846dc2ef |
children | e3fb9768dbb3 |
comparison
equal
deleted
inserted
replaced
509:e3b0846dc2ef | 510:2da0bcb979b5 |
---|---|
137 if( obj != null && luan.hasJava() ) | 137 if( obj != null && luan.hasJava() ) |
138 return JavaLuan.__index(bit,obj,key); | 138 return JavaLuan.__index(bit,obj,key); |
139 else if( bit.el==null ) | 139 else if( bit.el==null ) |
140 throw bit.exception( "attempt to index a " + Luan.type(obj) + " value" ); | 140 throw bit.exception( "attempt to index a " + Luan.type(obj) + " value" ); |
141 else | 141 else |
142 throw bit.exception( "attempt to index '"+bit.el.text()+"' (a " + Luan.type(obj) + " value)" ); | 142 throw bit.exception( "attempt to index a " + Luan.type(obj) + " value in '"+bit.el.text()+"'" ); |
143 } | 143 } |
144 | 144 |
145 public Object rawGet(Object key) { | 145 public Object rawGet(Object key) { |
146 if( list != null ) { | 146 if( list != null ) { |
147 Integer iT = Luan.asInteger(key); | 147 Integer iT = Luan.asInteger(key); |