changeset 249:9737ebb9aaa0

handle LuanExitException git-svn-id: https://luan-java.googlecode.com/svn/trunk@250 21e917c8-12df-6dd8-5cb6-c86387c605b9
author fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
date Fri, 17 Oct 2014 00:55:15 +0000
parents 10cc873babee
children 2b6f51d7af40
files core/src/luan/LuanJavaFunction.java dist/jars/luan-core-trunk.jar dist/jars/luan-logging-trunk.jar dist/jars/luan-lucene-trunk.jar dist/jars/luan-mail-trunk.jar dist/jars/luan-web-trunk.jar web/src/luan/modules/web/HttpLuan.java
diffstat 7 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/core/src/luan/LuanJavaFunction.java	Thu Oct 16 04:04:52 2014 +0000
+++ b/core/src/luan/LuanJavaFunction.java	Fri Oct 17 00:55:15 2014 +0000
@@ -97,6 +97,8 @@
 				throw (Error)cause;
 			if( cause instanceof LuanException )
 				throw (LuanException)cause;
+			if( cause instanceof LuanExitException )
+				throw (LuanExitException)cause;
 			throw luan.exception(cause);
 		} catch(InstantiationException e) {
 			throw new RuntimeException(e);
Binary file dist/jars/luan-core-trunk.jar has changed
Binary file dist/jars/luan-logging-trunk.jar has changed
Binary file dist/jars/luan-lucene-trunk.jar has changed
Binary file dist/jars/luan-mail-trunk.jar has changed
Binary file dist/jars/luan-web-trunk.jar has changed
--- a/web/src/luan/modules/web/HttpLuan.java	Thu Oct 16 04:04:52 2014 +0000
+++ b/web/src/luan/modules/web/HttpLuan.java	Fri Oct 17 00:55:15 2014 +0000
@@ -101,7 +101,11 @@
 			throw new RuntimeException(e);
 		}
 
-		luan.call(fn,"<http>");
+		try {
+			luan.call(fn,"<http>");
+		} catch(LuanExitException e) {
+//			System.out.println("caught LuanExitException");
+		}
 		return true;
 	}