comparison src/luan/lib/Utils.java @ 88:6ca02b188dba

add LuanBit to clean up code; add repr(); git-svn-id: https://luan-java.googlecode.com/svn/trunk@89 21e917c8-12df-6dd8-5cb6-c86387c605b9
author fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
date Wed, 27 Feb 2013 23:50:32 +0000
parents 6db8f286fa6c
children eacf6ce1b47d
comparison
equal deleted inserted replaced
87:eaf37cfa30c2 88:6ca02b188dba
14 public final class Utils { 14 public final class Utils {
15 private Utils() {} // never 15 private Utils() {} // never
16 16
17 public static void checkNotNull(LuanState luan,Object v,String expected) throws LuanException { 17 public static void checkNotNull(LuanState luan,Object v,String expected) throws LuanException {
18 if( v == null ) 18 if( v == null )
19 throw new LuanException(luan,LuanElement.JAVA,"bad argument #1 ("+expected+" expected, got nil)"); 19 throw luan.JAVA.exception("bad argument #1 ("+expected+" expected, got nil)");
20 } 20 }
21 21
22 public static String readAll(Reader in) 22 public static String readAll(Reader in)
23 throws IOException 23 throws IOException
24 { 24 {