Commit e8277a0a authored by kasperl@chromium.org's avatar kasperl@chromium.org

Changed d8 to print exception stack traces like samples/shell.cc.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7986 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent b253dd89
......@@ -266,6 +266,11 @@ void Shell::ReportException(v8::TryCatch* try_catch) {
printf("^");
}
printf("\n");
v8::String::Utf8Value stack_trace(try_catch->StackTrace());
if (stack_trace.length() > 0) {
const char* stack_trace_string = ToCString(stack_trace);
printf("%s\n", stack_trace_string);
}
}
}
......@@ -791,6 +796,8 @@ int Shell::Main(int argc, char* argv[]) {
} // namespace v8
#ifndef GOOGLE3
int main(int argc, char* argv[]) {
return v8::Shell::Main(argc, argv);
}
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment