Index: runtime/vm/snapshot.cc |
diff --git a/runtime/vm/snapshot.cc b/runtime/vm/snapshot.cc |
index 044d34bdf097248099afdc8dca0ba901a4bfa53a..c11e3213f0c4c09687517210b29cd88edcf94bc4 100644 |
--- a/runtime/vm/snapshot.cc |
+++ b/runtime/vm/snapshot.cc |
@@ -818,7 +818,7 @@ void SnapshotWriter::WriteObjectRef(RawObject* raw) { |
if (class_id >= kNumPredefinedCids) { |
if (Class::IsSignatureClass(cls)) { |
// We do not allow closure objects in an isolate message. |
- set_exception_type(Exceptions::kArgument); |
+ set_exception_type(Exceptions::kArgumentError); |
// TODO(6726): Allocate these constant strings once in the VM isolate. |
set_exception_msg("Illegal argument in isolate message" |
" : (object is a closure)"); |
@@ -1073,7 +1073,7 @@ void SnapshotWriter::WriteInlinedObject(RawObject* raw) { |
if (class_id >= kNumPredefinedCids) { |
if (Class::IsSignatureClass(cls)) { |
// We do not allow closure objects in an isolate message. |
- set_exception_type(Exceptions::kArgument); |
+ set_exception_type(Exceptions::kArgumentError); |
// TODO(6726): Allocate these constant strings once in the VM isolate. |
set_exception_msg("Illegal argument in isolate message" |
" : (object is a closure)"); |
@@ -1081,7 +1081,7 @@ void SnapshotWriter::WriteInlinedObject(RawObject* raw) { |
} |
if (cls->ptr()->num_native_fields_ != 0) { |
// We do not allow objects with native fields in an isolate message. |
- set_exception_type(Exceptions::kArgument); |
+ set_exception_type(Exceptions::kArgumentError); |
// TODO(6726): Allocate these constant strings once in the VM isolate. |
set_exception_msg("Illegal argument in isolate message" |
" : (object extends NativeWrapper)"); |