Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(246)

Unified Diff: runtime/lib/mirrors.cc

Issue 25566002: Factor out throwing of argument error. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/lib/isolate.cc ('k') | runtime/lib/string.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/mirrors.cc
===================================================================
--- runtime/lib/mirrors.cc (revision 28096)
+++ runtime/lib/mirrors.cc (working copy)
@@ -742,9 +742,7 @@
const Class& cls = Class::Handle(type.type_class());
ASSERT(!cls.IsNull());
if (cls.IsDynamicClass() || cls.IsVoidClass()) {
- const Array& args = Array::Handle(Array::New(1));
- args.SetAt(0, type);
- Exceptions::ThrowByType(Exceptions::kArgument, args);
+ Exceptions::ThrowArgumentError(type);
UNREACHABLE();
}
const Type& stripped_type = Type::Handle(cls.RareType());
« no previous file with comments | « runtime/lib/isolate.cc ('k') | runtime/lib/string.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698