comparison core/src/luan/modules/ThreadLuan.java @ 646:cdc70de628b5

simplify LuanException
author Franklin Schmidt <fschmidt@gmail.com>
date Tue, 29 Mar 2016 19:58:39 -0600
parents 31926755689e
children a82d385ec2c3
comparison
equal deleted inserted replaced
645:859c0dedc8b6 646:cdc70de628b5
26 } 26 }
27 }}); 27 }});
28 } 28 }
29 29
30 public static LuanFunction synchronized_(final LuanState luan,final LuanFunction fn) throws LuanException { 30 public static LuanFunction synchronized_(final LuanState luan,final LuanFunction fn) throws LuanException {
31 Utils.checkNotNull(luan,fn); 31 Utils.checkNotNull(fn);
32 return new LuanFunction() { 32 return new LuanFunction() {
33 @Override public Object call(LuanState ingored,Object[] args) throws LuanException { 33 @Override public Object call(LuanState ingored,Object[] args) throws LuanException {
34 synchronized(luan) { 34 synchronized(luan) {
35 return fn.call(luan,args); 35 return fn.call(luan,args);
36 } 36 }