comparison core/src/luan/impl/UnmExpr.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
21 LuanFunction fn = luan.getHandlerFunction("__unm",(LuanTable)o); 21 LuanFunction fn = luan.getHandlerFunction("__unm",(LuanTable)o);
22 if( fn != null ) { 22 if( fn != null ) {
23 return Luan.first(fn.call(luan,new Object[]{o})); 23 return Luan.first(fn.call(luan,new Object[]{o}));
24 } 24 }
25 } 25 }
26 throw new LuanException(luan,"attempt to perform arithmetic on a "+Luan.type(o)+" value"); 26 throw new LuanException("attempt to perform arithmetic on a "+Luan.type(o)+" value");
27 } 27 }
28 } 28 }