Skip to content

Commit

Permalink
Update ArgumentError to use message
Browse files Browse the repository at this point in the history
  • Loading branch information
danielway-wk committed Aug 4, 2023
1 parent c0e9f05 commit 2cb8077
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/src/r_tree/leaf_node.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class LeafNode<E> extends Node<E> {
LeafNode(int branchFactor, {List<RTreeDatum<E>>? initialItems}) : super(branchFactor) {
if (initialItems != null) {
if (initialItems.length > branchFactor) {
throw ArgumentError.value('too many items');
throw ArgumentError('too many items');
}
_items = initialItems;

Expand Down
2 changes: 1 addition & 1 deletion lib/src/r_tree/non_leaf_node.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class NonLeafNode<E> extends Node<E> {
NonLeafNode(int branchFactor, {List<Node<E>>? initialChildNodes}) : super(branchFactor) {
if (initialChildNodes != null) {
if (initialChildNodes.length > branchFactor) {
throw ArgumentError.value('too many items');
throw ArgumentError('too many items');
}
_childNodes = initialChildNodes;
updateBoundingRect();
Expand Down

0 comments on commit 2cb8077

Please sign in to comment.