Spotify.NET/SpotifyAPI.Web.Auth/AuthException.cs

26 lines
752 B
C#
Raw Normal View History

2024-02-10 11:15:58 +00:00
using System;
using System.Runtime.Serialization;
2020-05-15 19:06:24 +01:00
namespace SpotifyAPI.Web.Auth
{
2024-02-10 11:15:58 +00:00
[Serializable]
public class AuthException : Exception
2020-05-15 19:06:24 +01:00
{
2020-11-13 13:43:00 +00:00
public AuthException(string? error, string? state)
2020-05-15 19:06:24 +01:00
{
Error = error;
State = state;
}
public AuthException(string message) : base(message) { }
2024-02-10 11:15:58 +00:00
public AuthException(string message, Exception inner) : base(message, inner) { }
#if NET8_0_OR_GREATER
[Obsolete("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.")]
#endif
protected AuthException(SerializationInfo info, StreamingContext context) : base(info, context) { }
2020-05-15 19:06:24 +01:00
2020-05-25 17:00:38 +01:00
public string? Error { get; set; }
public string? State { get; set; }
2020-05-15 19:06:24 +01:00
}
}