Drey.Configuration.Infrastructure.HubConnectionManager.OnError C# (CSharp) Method

OnError() private method

private OnError ( Exception error ) : void
error System.Exception
return void
        private void OnError(Exception error)
        {
            if (error is WebException)
            {
                Exception inner = error;
                while (inner.InnerException != null)
                {
                    inner = inner.InnerException;
                }

                if (inner.Message.Contains("404"))
                {
                    _log.Warn("Server configuration may be invalid.  The signalr endpoint could not be located.");
                }
                else if (inner.Message.Contains("refused"))
                {
                    _log.Warn("Server may not be online, or internet may not be available.");
                }
                else
                {
                    _log.ErrorException(error.Message, error);
                }
            }

            if (Error != null)
            {
                Error(error);
            }
        }