diff --git a/lib/Logitar.Identity.Core/IdentityException.cs b/lib/Logitar.Identity.Core/IdentityException.cs new file mode 100644 index 0000000..ca8a836 --- /dev/null +++ b/lib/Logitar.Identity.Core/IdentityException.cs @@ -0,0 +1,16 @@ +namespace Logitar.Identity.Core; + +/// +/// The base class of Identity exceptions. +/// +public abstract class IdentityException : Exception +{ + /// + /// Initializes a new instance of the class. + /// + /// The exception message. + /// The inner exception. + protected IdentityException(string message, Exception? innerException = null) : base(message, innerException) + { + } +} diff --git a/lib/Logitar.Identity.Core/InvalidCredentialsException.cs b/lib/Logitar.Identity.Core/InvalidCredentialsException.cs index e4f3c0f..2e65c0f 100644 --- a/lib/Logitar.Identity.Core/InvalidCredentialsException.cs +++ b/lib/Logitar.Identity.Core/InvalidCredentialsException.cs @@ -3,7 +3,7 @@ /// /// The exception raised when credential validation failed. /// -public class InvalidCredentialsException : Exception +public class InvalidCredentialsException : IdentityException { /// /// A generic error message for this exception. diff --git a/lib/Logitar.Identity.Core/TenantMismatchException.cs b/lib/Logitar.Identity.Core/TenantMismatchException.cs index 816e077..b91f47c 100644 --- a/lib/Logitar.Identity.Core/TenantMismatchException.cs +++ b/lib/Logitar.Identity.Core/TenantMismatchException.cs @@ -3,7 +3,7 @@ /// /// The exception raised when an association is made between two entities in different tenants. /// -public class TenantMismatchException : Exception +public class TenantMismatchException : IdentityException { /// /// A generic error message for this exception.