comparison core/src/luan/impl/LeExpr.java @ 578:60c549d43988

remove LuanState.exception()
author Franklin Schmidt <fschmidt@gmail.com>
date Tue, 14 Jul 2015 17:40:48 -0600
parents 4723d22062ce
children 859c0dedc8b6
comparison
equal deleted inserted replaced
577:d7a85fbe15f1 578:60c549d43988
35 if( fn != null ) 35 if( fn != null )
36 return luan.checkBoolean( Luan.first(fn.call(luan,new Object[]{o1,o2})) ); 36 return luan.checkBoolean( Luan.first(fn.call(luan,new Object[]{o1,o2})) );
37 fn = luan.getBinHandler("__lt",o1,o2); 37 fn = luan.getBinHandler("__lt",o1,o2);
38 if( fn != null ) 38 if( fn != null )
39 return !luan.checkBoolean( Luan.first(fn.call(luan,new Object[]{o2,o1})) ); 39 return !luan.checkBoolean( Luan.first(fn.call(luan,new Object[]{o2,o1})) );
40 throw luan.exception( "attempt to compare " + Luan.type(o1) + " with " + Luan.type(o2) ); 40 throw new LuanException(luan, "attempt to compare " + Luan.type(o1) + " with " + Luan.type(o2) );
41 } finally { 41 } finally {
42 luan.pop(); 42 luan.pop();
43 } 43 }
44 } 44 }
45 } 45 }