您最多选择25个主题
主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
51 行
1.1 KiB
51 行
1.1 KiB
using System;
|
|
using Unity.Services.Lobbies;
|
|
|
|
namespace Unity.Services.Lobbies.Http
|
|
{
|
|
[Serializable]
|
|
public class HttpException : Exception
|
|
{
|
|
public HttpClientResponse Response;
|
|
|
|
public HttpException() : base()
|
|
{
|
|
}
|
|
|
|
public HttpException(string message) : base(message)
|
|
{
|
|
}
|
|
|
|
public HttpException(string message, Exception inner) : base(message, inner)
|
|
{
|
|
}
|
|
|
|
public HttpException(HttpClientResponse response) : base(response.ErrorMessage)
|
|
{
|
|
Response = response;
|
|
}
|
|
}
|
|
|
|
[Serializable]
|
|
public class HttpException<T> : HttpException
|
|
{
|
|
public T ActualError;
|
|
|
|
public HttpException() : base()
|
|
{
|
|
}
|
|
|
|
public HttpException(string message) : base(message)
|
|
{
|
|
}
|
|
|
|
public HttpException(string message, Exception inner) : base(message, inner)
|
|
{
|
|
}
|
|
|
|
public HttpException(HttpClientResponse response, T actualError) : base(response)
|
|
{
|
|
ActualError = actualError;
|
|
}
|
|
}
|
|
}
|