RaumfeldNET.Global.getCrashInfo C# (CSharp) Method

getCrashInfo() public static method

public static getCrashInfo ( ) : String
return String
        public static String getCrashInfo()
        {
            return "Ausnahmefehler im Programm! Bitte überprüfen Sie das Logfile!";
        }

Usage Example

        protected String getMediaServerIP(CpMediaServer _mediaServer)
        {
            if (_mediaServer == null)
            {
                return(String.Empty);
            }

            this.writeLog(LogType.Info, "Auflösen der Raumfeld-MedienServer IP");

            Uri url = new Uri(mediaServer.Location);

            try
            {
                IPAddress address = IPAddress.Parse(url.Host);
                return(address.ToString());
            }
            catch (Exception e)
            {
                this.writeLog(LogType.Warning, String.Format("IP-Adresse konnte nicht aufgelöst werden. Host: {0} Suche über DNS", url.Host), e);
            }

            try
            {
                IPHostEntry hostEntry = Dns.GetHostEntry(url.Host);
                return(hostEntry.AddressList[0].ToString());
            }
            catch (Exception e)
            {
                this.writeLog(LogType.Error, String.Format("IP-Adresse konnte nicht per DNS aufgelöst werden. Host: {0}", url.Host), e);
                // this is a fatal error! App hast to crash!
                throw new Exception(Global.getCrashInfo());
            }
        }
All Usage Examples Of RaumfeldNET.Global::getCrashInfo