Skip to content

Commit 6c2136b

Browse files
xDivisionByZeroxST-DDT
authored andcommitted
refactor: change error message for all charcters baned
1 parent 2abdd27 commit 6c2136b

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
@@ -485,7 +485,9 @@ export class Random {
485485
}
486486

487487
if (charsArray.length <= 0) {
488-
throw new Error('Not able to ban all charcters.');
488+
throw new Error(
489+
'Unable to generate string, because all possible characters are banned.'
490+
);
489491
}
490492

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

0 commit comments

Comments
 (0)