diff core/src/luan/modules/PickleCon.java @ 578:60c549d43988

remove LuanState.exception()
author Franklin Schmidt <fschmidt@gmail.com>
date Tue, 14 Jul 2015 17:40:48 -0600
parents 7c3ad6db8ac3
children
line wrap: on
line diff
--- a/core/src/luan/modules/PickleCon.java	Mon Jul 13 20:53:02 2015 -0600
+++ b/core/src/luan/modules/PickleCon.java	Tue Jul 14 17:40:48 2015 -0600
@@ -48,7 +48,7 @@
 		while( i < size ) {
 			int n = in.read(a,i,size-i);
 			if( n == -1 )
-//				throw luan.exception( "end of stream" );
+//				throw new LuanException(luan, "end of stream" );
 				throw new EOFException();
 			i += n;
 		}
@@ -83,7 +83,7 @@
 			binaries.add(a);
 			return "_binaries[" + binaries.size() + "]";
 		}
-		throw luan.exception( "invalid type: " + obj.getClass() );
+		throw new LuanException(luan, "invalid type: " + obj.getClass() );
 	}
 
 	private String pickle(Object obj,Set<LuanTable> set) throws LuanException {
@@ -92,7 +92,7 @@
 
 	private String pickle(LuanTable tbl,Set<LuanTable> set) throws LuanException {
 		if( !set.add(tbl) ) {
-			throw luan.exception( "circular reference in table" );
+			throw new LuanException(luan, "circular reference in table" );
 		}
 		StringBuilder sb = new StringBuilder();
 		sb.append( "{" );