From 8ccf40a72218fcae31ae405c77571e49643db065 Mon Sep 17 00:00:00 2001 From: Sam Sippe Date: Fri, 20 Jan 2023 09:36:52 +1000 Subject: [PATCH] Update Ulid.cs see https://github.com/mcb2001/CSharp.Ulid/issues/7 --- CSharp.Ulid/Ulid.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/CSharp.Ulid/Ulid.cs b/CSharp.Ulid/Ulid.cs index 3f339c7..741bb25 100644 --- a/CSharp.Ulid/Ulid.cs +++ b/CSharp.Ulid/Ulid.cs @@ -146,6 +146,7 @@ private static void AddOne(byte[] bytes) bytes[index] = 0; } + throw new Exception("No more randomness available. Too many IDs generated this millisecond."); } public override string ToString() => StringExtensions.Create(VALID_ULID_STRING_LENGTH, new UlidStringHelper(this), (buffer, value) =>