mirror of
https://github.com/BililiveRecorder/BililiveRecorder.git
synced 2024-11-16 03:32:20 +08:00
6514bcf9c1
close #418
24 lines
931 B
C#
24 lines
931 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) { }
|
|
protected BilibiliApiResponseCodeNotZeroException(SerializationInfo info, StreamingContext context) : base(info, context) { }
|
|
}
|
|
}
|