csharp.libraries.unityWebRequest.ConnectionException.mustache Maven / Gradle / Ivy
{{>partial_header}}
using System;
using UnityEngine.Networking;
namespace {{packageName}}.Client
{
public class ConnectionException : Exception
{
public UnityWebRequest.Result Result { get; private set; }
public string Error { get; private set; }
// NOTE: Cannot keep reference to the request since it will be disposed.
public ConnectionException(UnityWebRequest request)
: base($"result={request.result} error={request.error}")
{
Result = request.result;
Error = request.error ?? "";
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy