diff options
| author | Leyla Jähnig <[email protected]> | 2022-03-31 22:42:37 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-03-31 22:42:37 +0200 |
| commit | c3be3b1945248ed422342b046ad765d252bbac05 (patch) | |
| tree | 0c4c6550092d675386937ff1ee8fd7f490c34711 /src/utils | |
| parent | 48dcec18136e437dc537f0a58f30379a8ce531e8 (diff) | |
| download | faker-c3be3b1945248ed422342b046ad765d252bbac05.tar.xz faker-c3be3b1945248ed422342b046ad765d252bbac05.zip | |
feat: FakerError (#718)
Diffstat (limited to 'src/utils')
| -rw-r--r-- | src/utils/unique.ts | 4 |
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()' ); |
