ACR_ServerCommunicator.GameWorldManager.IsConnectivityFailureException C# (CSharp) Method

IsConnectivityFailureException() private static method

Check whether an exception might be a database connectivity related exception (versus any other reason).
private static IsConnectivityFailureException ( Exception e, string Description ) : bool
e System.Exception Supplies the exception object.
Description string Supplies the exception description. ///
return bool
        private static bool IsConnectivityFailureException(Exception e, string Description)
        {
            //
            // This is a giant hack.  Unfortunately the MySQL library doesn't
            // seem to expose any real indication of whether a failure was due
            // to a connectivity related issue or some unrelated cause (such as
            // a server-side processing error).
            //
            // Hence, English-language parse.
            //

            if (Description.Contains("Unable to connect to any of the specified MySQL hosts.") ||
                Description.Contains("A connection attempt failed") ||
                Description.Contains("Timeout in IO operation"))
            {
                return true;
            }
            else
            {
                return false;
            }
        }