Index: src/d8.cc |
diff --git a/src/d8.cc b/src/d8.cc |
index c58c172640edfd31fe0c2e876c8ab98f739cd869..e35b6a7fbcbe013b830d4f0bea9566f0285d116f 100644 |
--- a/src/d8.cc |
+++ b/src/d8.cc |
@@ -375,6 +375,7 @@ |
bool report_exceptions, SourceType source_type) { |
HandleScope handle_scope(isolate); |
TryCatch try_catch(isolate); |
+ try_catch.SetVerbose(true); |
MaybeLocal<Value> maybe_result; |
{ |
@@ -1247,6 +1248,10 @@ |
return global_template; |
} |
+static void EmptyMessageCallback(Local<Message> message, Local<Value> error) { |
+ // Nothing to be done here, exceptions thrown up to the shell will be reported |
+ // separately by {Shell::ReportException} after they are caught. |
+} |
void Shell::Initialize(Isolate* isolate) { |
#ifndef V8_SHARED |
@@ -1254,6 +1259,8 @@ |
if (i::StrLength(i::FLAG_map_counters) != 0) |
MapCounters(isolate, i::FLAG_map_counters); |
#endif // !V8_SHARED |
+ // Disable default message reporting. |
+ isolate->AddMessageListener(EmptyMessageCallback); |
} |