BililiveRecorder/BililiveRecorder.Core/Api/BilibiliApiResponseCodeNotZeroException.cs
Genteure 453e63c651
feat: upgrade target framework for cli to .NET 8.0 (#624)
* feat: upgrade target framework to .NET 8.0

* refactor: fix obsolete warnings

* chore: update AutoMapper package to version 13.0.1

* chore: suppress warnings

* feat: upgrade Docker images to .NET 8.0
2024-11-22 14:52:28 +00:00

23 lines
797 B
C#

using System;
using System.Runtime.Serialization;
namespace BililiveRecorder.Core.Api
{
internal class BilibiliApiResponseCodeNotZeroException : Exception
{
public int? Code { get; }
public string? Body { get; }
public BilibiliApiResponseCodeNotZeroException(int? code, string? body) : base(message: "BiliBili API Code: " + (code?.ToString() ?? "(null)") + "\n" + body)
{
this.Code = code;
this.Body = body;
}
public BilibiliApiResponseCodeNotZeroException() { }
[Obsolete]
public BilibiliApiResponseCodeNotZeroException(string message) : base(message) { }
public BilibiliApiResponseCodeNotZeroException(string message, Exception innerException) : base(message, innerException) { }
}
}