Index: samples/shell.cc |
diff --git a/samples/shell.cc b/samples/shell.cc |
index 6b67df6c6c56467611d4277426df9af250e07574..64f78f02c61ec6df0e0c1a8f2504478e2b0816be 100644 |
--- a/samples/shell.cc |
+++ b/samples/shell.cc |
@@ -27,6 +27,7 @@ |
#include <v8.h> |
#include <v8-testing.h> |
+#include <assert.h> |
#include <fcntl.h> |
#include <string.h> |
#include <stdio.h> |
@@ -290,11 +291,13 @@ bool ExecuteString(v8::Handle<v8::String> source, |
} else { |
v8::Handle<v8::Value> result = script->Run(); |
if (result.IsEmpty()) { |
+ assert(try_catch.HasCaught()); |
// Print errors that happened during execution. |
if (report_exceptions) |
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. |