Index: sdk/lib/_internal/compiler/implementation/lib/js_mirrors.dart |
diff --git a/sdk/lib/_internal/compiler/implementation/lib/js_mirrors.dart b/sdk/lib/_internal/compiler/implementation/lib/js_mirrors.dart |
index aaf30d7d4b78978f1f6ffaf676206507b0a6776d..5b4f36a109a42e96bd7ca63087cfeee43b00a3d7 100644 |
--- a/sdk/lib/_internal/compiler/implementation/lib/js_mirrors.dart |
+++ b/sdk/lib/_internal/compiler/implementation/lib/js_mirrors.dart |
@@ -428,7 +428,7 @@ class JsVariableMirror implements VariableMirror { |
int length = descriptor.length; |
var code = fieldCode(descriptor.codeUnitAt(length - 1)); |
if (code == 0) { |
- throw new RuntimeError('Bad field descriptor: $descriptor'); |
+ throw new ArgumentError('Bad field descriptor: $descriptor'); |
} |
bool hasGetter = (code & 3) != 0; |
bool hasSetter = (code >> 2) != 0; |
@@ -481,7 +481,7 @@ function(reflectee) { |
'''); |
String callName = JS('String|Null', '#(#)', extractCallName, reflectee); |
if (callName == null) { |
- throw new RuntimeError('Cannot find callName on "$reflectee"'); |
+ throw new ArgumentError('Cannot find callName on "$reflectee"'); |
} |
int parameterCount = int.parse(callName.split(r'$')[1]); |
if (reflectee is BoundClosure) { |