diff core/src/luan/modules/BasicLuan.java @ 447:0bd42e774c50

add assert_binary; improve wrong type messages;
author Franklin Schmidt <fschmidt@gmail.com>
date Mon, 04 May 2015 17:19:43 -0600
parents bbad2d06f728
children 8b2db645b9b2
line wrap: on
line diff
--- a/core/src/luan/modules/BasicLuan.java	Mon May 04 16:21:17 2015 -0600
+++ b/core/src/luan/modules/BasicLuan.java	Mon May 04 17:19:43 2015 -0600
@@ -153,6 +153,11 @@
 		return v;
 	}
 
+	@LuanMethod public static byte[] assert_binary(LuanState luan,byte[] v) throws LuanException {
+		Utils.checkNotNull(luan,v);
+		return v;
+	}
+
 	public static LuanFunction range(LuanState luan,final double from,final double to,Double stepV) throws LuanException {
 		final double step = stepV==null ? 1.0 : stepV;
 		if( step == 0.0 )