All Downloads are FREE. Search and download functionalities are using the official Maven repository.

csharp.libraries.unityWebRequest.ConnectionException.mustache Maven / Gradle / Ivy

There is a newer version: 7.9.0
Show newest version
{{>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