Skip to content

Commit 9bda61e

Browse files
refactor: change error message for all charcters baned
1 parent da75cf7 commit 9bda61e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/random.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,9 @@ export class Random {
431431
}
432432

433433
if (charsArray.length <= 0) {
434-
throw new Error('Not able to ban all charcters.');
434+
throw new Error(
435+
'Unable to generate string, because all possible characters are banned.'
436+
);
435437
}
436438

437439
for (let i = 0; i < count; i++) {

0 commit comments

Comments
 (0)