Index: src/wasm/wasm-result.cc |
diff --git a/src/wasm/wasm-result.cc b/src/wasm/wasm-result.cc |
index 3de5812e9f47638753246775a6ce60cca637c672..08d8f06406c66ed350ec01fc7e0cdebeb2f64ae6 100644 |
--- a/src/wasm/wasm-result.cc |
+++ b/src/wasm/wasm-result.cc |
@@ -29,7 +29,8 @@ std::ostream& operator<<(std::ostream& os, const ErrorCode& error_code) { |
} |
void ErrorThrower::Error(const char* format, ...) { |
- if (error_) return; // only report the first error. |
+ // only report the first error. |
+ if (error_ || isolate_->has_pending_exception()) return; |
error_ = true; |
char buffer[256]; |