Better error messages for d8's load() (execute from file).

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
This commit is contained in:
yangguo@chromium.org 2011-09-09 11:10:36 +00:00
parent 9b2de409f9
commit 2a92165101

View File

@ -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");
}