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

simplify LuanException
author Franklin Schmidt <fschmidt@gmail.com>
date Tue, 29 Mar 2016 19:58:39 -0600
parents 859c0dedc8b6
children 8e8c30b72e9b
comparison
equal deleted inserted replaced
645:859c0dedc8b6 646:cdc70de628b5
32 if( fn != null ) 32 if( fn != null )
33 return luan.checkBoolean( Luan.first(fn.call(luan,new Object[]{o1,o2})) ); 33 return luan.checkBoolean( Luan.first(fn.call(luan,new Object[]{o1,o2})) );
34 fn = luan.getBinHandler("__lt",o1,o2); 34 fn = luan.getBinHandler("__lt",o1,o2);
35 if( fn != null ) 35 if( fn != null )
36 return !luan.checkBoolean( Luan.first(fn.call(luan,new Object[]{o2,o1})) ); 36 return !luan.checkBoolean( Luan.first(fn.call(luan,new Object[]{o2,o1})) );
37 throw new LuanException(luan, "attempt to compare " + Luan.type(o1) + " with " + Luan.type(o2) ); 37 throw new LuanException( "attempt to compare " + Luan.type(o1) + " with " + Luan.type(o2) );
38 } 38 }
39 } 39 }