Throw a more descriptive ArgumentError for invalid maxAllocatedResources
diff --git a/lib/pool.dart b/lib/pool.dart
index 40a2580..6994c76 100644
--- a/lib/pool.dart
+++ b/lib/pool.dart
@@ -80,7 +80,8 @@
/// intended to avoid deadlocks.
Pool(this._maxAllocatedResources, {Duration timeout}) : _timeout = timeout {
if (_maxAllocatedResources <= 0) {
- throw ArgumentError('pool limit should be > 0');
+ throw ArgumentError.value(_maxAllocatedResources, 'maxAllocatedResources',
+ 'Must be greater than zero.');
}
if (timeout != null) {