Better error messages for d8's load() (execute from file).
authoryangguo@chromium.org <yangguo@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 9 Sep 2011 11:10:36 +0000 (11:10 +0000)
committeryangguo@chromium.org <yangguo@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 9 Sep 2011 11:10:36 +0000 (11:10 +0000)
BUG=v8:796

Review URL: http://codereview.chromium.org/7754018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9209 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/d8.cc

index ffe64ef..371c312 100644 (file)
--- a/src/d8.cc
+++ b/src/d8.cc
@@ -271,7 +271,7 @@ Handle<Value> Shell::Load(const Arguments& args) {
     if (source.IsEmpty()) {
       return ThrowException(String::New("Error loading file"));
     }
-    if (!ExecuteString(source, String::New(*file), false, false)) {
+    if (!ExecuteString(source, String::New(*file), false, true)) {
       return ThrowException(String::New("Error executing file"));
     }
   }
@@ -439,6 +439,7 @@ void Shell::ReportException(v8::TryCatch* try_catch) {
       printf("%s\n", stack_trace_string);
     }
   }
+  printf("\n");
 }