comparison core/src/luan/modules/BasicLuan.java @ 444:e45bcaf6f5fe

remove assert_nil
author Franklin Schmidt <fschmidt@gmail.com>
date Mon, 04 May 2015 14:59:01 -0600
parents bf5e62a9090c
children bbad2d06f728
comparison
equal deleted inserted replaced
443:bf5e62a9090c 444:e45bcaf6f5fe
132 132
133 public static boolean assert_boolean(LuanState luan,boolean v) throws LuanException { 133 public static boolean assert_boolean(LuanState luan,boolean v) throws LuanException {
134 return v; 134 return v;
135 } 135 }
136 136
137 public static Object assert_nil(LuanState luan,Object v) throws LuanException {
138 if( v != null )
139 throw luan.exception("bad argument #1 (nil expected, got "+Luan.type(v)+")");
140 return v;
141 }
142
143 public static int assert_integer(LuanState luan,int v) throws LuanException { 137 public static int assert_integer(LuanState luan,int v) throws LuanException {
144 return v; 138 return v;
145 } 139 }
146 140
147 public static long assert_long(LuanState luan,long v) throws LuanException { 141 public static long assert_long(LuanState luan,long v) throws LuanException {