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/random.ts | |
| parent | 48dcec18136e437dc537f0a58f30379a8ce531e8 (diff) | |
| download | faker-c3be3b1945248ed422342b046ad765d252bbac05.tar.xz faker-c3be3b1945248ed422342b046ad765d252bbac05.zip | |
feat: FakerError (#718)
Diffstat (limited to 'src/random.ts')
| -rw-r--r-- | src/random.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/random.ts b/src/random.ts index f41a67fa..20d54f5b 100644 --- a/src/random.ts +++ b/src/random.ts @@ -1,4 +1,5 @@ import type { Faker } from '.'; +import { FakerError } from './errors/faker-error'; import { deprecated } from './internal/deprecated'; /** @@ -527,7 +528,7 @@ export class Random { } if (charsArray.length === 0) { - throw new Error( + throw new FakerError( 'Unable to generate string, because all possible characters are banned.' ); } |
