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