Esempio n. 1
0
        public static RealtimeCommand Create(ErrorInfo error)
        {
            if (error == null || error.IsTokenError == false)
            {
#if DEBUG
                throw new ArgumentException("Cannot create a TokenError command with an error that is not a token error.");
#else
                DefaultLogger.Warning("Cannot create a TokenError command with an error that is not a token error");

                // TODO: Sentry alert
                return(EmptyCommand.Instance);
#endif
            }

            return(new HandleConnectingTokenErrorCommand(error));
        }