Index: runtime/vm/isolate.cc |
diff --git a/runtime/vm/isolate.cc b/runtime/vm/isolate.cc |
index 03b275e17cdd9e3b739efc31fa17e5e2aa19db34..d46aec2aaf528f8817d3406855ef9d82529a285c 100644 |
--- a/runtime/vm/isolate.cc |
+++ b/runtime/vm/isolate.cc |
@@ -1784,6 +1784,10 @@ void Isolate::PrintJSON(JSONStream* stream, bool ref) { |
Error& error = Error::Handle(Thread::Current()->sticky_error()); |
ASSERT(!error.IsNull()); |
jsobj.AddProperty("error", error, false); |
+ } else if (sticky_error() != Object::null()) { |
+ Error& error = Error::Handle(sticky_error()); |
+ ASSERT(!error.IsNull()); |
+ jsobj.AddProperty("error", error, false); |
} |
{ |