This commit is contained in:
Dan Clark
2024-11-28 21:52:42 +00:00
parent a457f4d6df
commit aeff13a105
5 changed files with 95 additions and 36 deletions
+5 -7
View File
@@ -1,14 +1,12 @@
namespace Toolkit.Foundation;
public record Error(string Code, string Message)
public record Reason(string Code, string Message)
{
public static readonly Error None = new(string.Empty, string.Empty);
public static readonly Reason None = new(string.Empty, string.Empty);
public static readonly Error Null = new("Error.NullValue", "The specified result value is null.");
public static readonly Reason Null = new("Error.NullValue", "The specified result value is null.");
public static readonly Error ConditionNotMet = new("Error.ConditionNotMet", "The specified condition was not met.");
public static readonly Reason ConditionNotMet = new("Error.ConditionNotMet", "The specified condition was not met.");
public static readonly Error Duplicated = new("Error.Duplicated", "The specified item already exists.");
public static readonly Error Failure = new("Error.Failure", "The operation has failed.");
public static readonly Reason Failure = new("Error.Failure", "The operation has failed.");
}