comparison core/src/luan/impl/BinaryOpExpr.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
22 try { 22 try {
23 LuanFunction fn = luan.getBinHandler(op,o1,o2); 23 LuanFunction fn = luan.getBinHandler(op,o1,o2);
24 if( fn != null ) 24 if( fn != null )
25 return Luan.first(fn.call(luan,new Object[]{o1,o2})); 25 return Luan.first(fn.call(luan,new Object[]{o1,o2}));
26 String type = !(o1 instanceof Number) ? Luan.type(o1) : Luan.type(o2); 26 String type = !(o1 instanceof Number) ? Luan.type(o1) : Luan.type(o2);
27 throw luan.exception("attempt to perform arithmetic on a "+type+" value"); 27 throw new LuanException(luan,"attempt to perform arithmetic on a "+type+" value");
28 } finally { 28 } finally {
29 luan.pop(); 29 luan.pop();
30 } 30 }
31 } 31 }
32 32