Novell.Directory.Ldap.LdapReferralException.ToString C# (CSharp) Method

ToString() public method

returns a string of information about the exception and the the nested exceptions, if any.
public ToString ( ) : System.String
return System.String
        public override System.String ToString()
        {
            System.String msg, tmsg;

            // Format the basic exception information
            msg = getExceptionString("LdapReferralException");

            // Add failed referral information
            if ((System.Object) failedReferral != null)
            {
                tmsg = ResourcesHandler.getMessage("FAILED_REFERRAL", new System.Object[]{"LdapReferralException", failedReferral});
                // If found no string from resource file, use a default string
                if (tmsg.ToUpper().Equals("SERVER_MSG".ToUpper()))
                {
                    tmsg = "LdapReferralException: Failed Referral: " + failedReferral;
                }
                msg = msg + '\n' + tmsg;
            }

            // Add referral information, display all the referrals in the list
            if (referrals != null)
            {
                for (int i = 0; i < referrals.Length; i++)
                {
                    tmsg = ResourcesHandler.getMessage("REFERRAL_ITEM", new System.Object[]{"LdapReferralException", referrals[i]});
                    // If found no string from resource file, use a default string
                    if (tmsg.ToUpper().Equals("SERVER_MSG".ToUpper()))
                    {
                        tmsg = "LdapReferralException: Referral: " + referrals[i];
                    }
                    msg = msg + '\n' + tmsg;
                }
            }
            return msg;
        }