Index: lib/html/dartium/html_dartium.dart |
diff --git a/lib/html/dartium/html_dartium.dart b/lib/html/dartium/html_dartium.dart |
index cd835f90f579d4cd3d7563de51b971ab145b2dbf..a0d5a39bf07fe2a03675328e5ce044cbc9c6734b 100644 |
--- a/lib/html/dartium/html_dartium.dart |
+++ b/lib/html/dartium/html_dartium.dart |
@@ -11659,7 +11659,7 @@ class FilteredElementList implements ElementList { |
if (newLength >= len) { |
return; |
} else if (newLength < 0) { |
- throw const IllegalArgumentException("Invalid list length"); |
+ throw const ArgumentError("Invalid list length"); |
} |
removeRange(newLength - 1, len - newLength); |
@@ -11811,7 +11811,7 @@ class _DocumentFragmentImpl extends _NodeImpl implements DocumentFragment { |
this.nodes.add(node); |
return node; |
default: |
- throw new IllegalArgumentException("Invalid position ${where}"); |
+ throw new ArgumentError("Invalid position ${where}"); |
} |
} |
@@ -13788,7 +13788,7 @@ class _ElementFactoryProvider { |
// only contains a head or body element. |
element = temp.elements[tag == 'head' ? 0 : 1]; |
} else { |
- throw new IllegalArgumentException('HTML had ${temp.elements.length} ' |
+ throw new ArgumentError('HTML had ${temp.elements.length} ' |
'top level elements but 1 expected'); |
} |
element.remove(); |
@@ -22370,7 +22370,7 @@ class _MutationObserverImpl extends NativeFieldWrapperClass1 implements Mutation |
} else if (k == 'attributeFilter') { |
_add(parsedOptions, k, _fixupList(v)); |
} else { |
- throw new IllegalArgumentException( |
+ throw new ArgumentError( |
"Illegal MutationObserver.observe option '$k'"); |
} |
}); |
@@ -43309,7 +43309,7 @@ class _SVGElementFactoryProvider { |
parentTag.innerHTML = svg; |
if (parentTag.elements.length == 1) return parentTag.nodes.removeLast(); |
- throw new IllegalArgumentException( |
+ throw new ArgumentError( |
'SVG had ${parentTag.elements.length} ' |
'top-level elements but 1 expected'); |
} |
@@ -44191,12 +44191,12 @@ class _Lists { |
* Returns a sub list copy of this list, from [start] to |
* [:start + length:]. |
* Returns an empty list if [length] is 0. |
- * Throws an [IllegalArgumentException] if [length] is negative. |
+ * Throws an [ArgumentError] if [length] is negative. |
* Throws an [IndexOutOfRangeException] if [start] or |
* [:start + length:] are out of range. |
*/ |
static List getRange(List a, int start, int length, List accumulator) { |
- if (length < 0) throw new IllegalArgumentException('length'); |
+ if (length < 0) throw new ArgumentError('length'); |
if (start < 0) throw new IndexOutOfRangeException(start); |
int end = start + length; |
if (end > a.length) throw new IndexOutOfRangeException(end); |