changeset 201:27abb3746917

minir git-svn-id: https://luan-java.googlecode.com/svn/trunk@202 21e917c8-12df-6dd8-5cb6-c86387c605b9
author fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
date Thu, 03 Jul 2014 22:42:44 +0000
parents 9fb218211763
children 75750ceb45ee
files core/src/luan/Luan.java core/src/luan/cmd_line.luan
diffstat 2 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/core/src/luan/Luan.java	Thu Jul 03 22:22:16 2014 +0000
+++ b/core/src/luan/Luan.java	Thu Jul 03 22:42:44 2014 +0000
@@ -111,7 +111,7 @@
 			return Luan.toString((Number)obj);
 		if( obj instanceof LuanException ) {
 			LuanException le = (LuanException)obj;
-			return le.getMessage();
+			return le.getFullMessage();
 		}
 		if( obj instanceof byte[] )
 			return "binary: " + Integer.toHexString(obj.hashCode());
--- a/core/src/luan/cmd_line.luan	Thu Jul 03 22:22:16 2014 +0000
+++ b/core/src/luan/cmd_line.luan	Thu Jul 03 22:42:44 2014 +0000
@@ -65,8 +65,12 @@
 	for j,v in ipairs(args) do
 		_G.arg[j-i] = v
 	end
-	local main_file = load_file(file)
-	main_file( Table.unpack(_G.arg) )
+	try
+		local main_file = load_file(file)
+		main_file( Table.unpack(_G.arg) )
+	catch e do
+		print(e)
+	end
 end
 if interactive then
 	Debug.debug("> ")