comparison core/src/luan/impl/LenExpr.java @ 646:cdc70de628b5

simplify LuanException
author Franklin Schmidt <fschmidt@gmail.com>
date Tue, 29 Mar 2016 19:58:39 -0600
parents 859c0dedc8b6
children
comparison
equal deleted inserted replaced
645:859c0dedc8b6 646:cdc70de628b5
21 if( o instanceof byte[] ) { 21 if( o instanceof byte[] ) {
22 byte[] a = (byte[])o; 22 byte[] a = (byte[])o;
23 return a.length; 23 return a.length;
24 } 24 }
25 if( !(o instanceof LuanTable) ) 25 if( !(o instanceof LuanTable) )
26 throw new LuanException(luan, "attempt to get length of a " + Luan.type(o) + " value" ); 26 throw new LuanException( "attempt to get length of a " + Luan.type(o) + " value" );
27 LuanTable t = (LuanTable)o; 27 LuanTable t = (LuanTable)o;
28 return t.length(luan); 28 return t.length(luan);
29 } 29 }
30 } 30 }