aboutsummaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/unique.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/utils/unique.ts b/src/utils/unique.ts
index 78d0fdfc..2679b3d8 100644
--- a/src/utils/unique.ts
+++ b/src/utils/unique.ts
@@ -1,3 +1,5 @@
+import { FakerError } from '../errors/faker-error';
+
export type RecordKey = string | number | symbol;
// global results store
@@ -41,7 +43,7 @@ function errorMessage(
now - opts.startTime,
'ms'
);
- throw new Error(
+ throw new FakerError(
code +
' for uniqueness check \n\nMay not be able to generate any more unique values with current settings. \nTry adjusting maxTime or maxRetries parameters for faker.unique()'
);