Fix for error handling to handle string exceptions

Sun, 23 May 2010 13:48:29 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Sun, 23 May 2010 13:48:29 +0100
changeset 35
3de1d63ffdf7
parent 34
2c3d73c76d0f
child 36
9e7b57b0b78f

Fix for error handling to handle string exceptions

lvm.js file | annotate | diff | comparison | revisions
--- a/lvm.js	Sun May 23 13:28:45 2010 +0100
+++ b/lvm.js	Sun May 23 13:48:29 2010 +0100
@@ -440,6 +440,6 @@
 catch(e)
 {
 	print("Error: " + e);
-	if("stack" in e)
+	if(typeof(e) == "object" && "stack" in e)
 		print(e.stack);
 }

mercurial