| Index: src/d8.cc
|
| diff --git a/src/d8.cc b/src/d8.cc
|
| index f0da7ac8bcf4b89070c71ca7e4bc232d3a82cc15..4dcc794bb33803ec09cff7dfe684d6cfbc6dba61 100644
|
| --- a/src/d8.cc
|
| +++ b/src/d8.cc
|
| @@ -127,11 +127,13 @@ bool Shell::ExecuteString(Handle<String> source,
|
| } else {
|
| Handle<Value> result = script->Run();
|
| if (result.IsEmpty()) {
|
| + ASSERT(try_catch.HasCaught());
|
| // Print errors that happened during execution.
|
| if (report_exceptions && !i::FLAG_debugger)
|
| ReportException(&try_catch);
|
| return false;
|
| } else {
|
| + ASSERT(!try_catch.HasCaught());
|
| if (print_result && !result->IsUndefined()) {
|
| // If all went well and the result wasn't undefined then print
|
| // the returned value.
|
|
|