/// <summary>
        /// Kodun patladığı yeri formatlamak için
        /// </summary>
        /// <param name="methodbase">Çağıran metod bilgisi. </param>
        /// <param name="errorDesc">Hata için bizim açıklamamız</param>
        /// <param name="ex">Hata sınıfı</param>
        /// <param name="exType">Hata tipi</param>
        /// <returns>Geriye formatlanmış hatayı döner</returns>
        public string FormatExceptionThrowCatch(MethodBase methodbase, string errorDesc, System.Exception ex, ExceptionTypes exType)
        {
            //istenildiği takdirde hatanın daha derin detayları burada tek bir noktadan 
            //eklenebilir veya formatlanabilir.
            string formattedException = string.Format(@"<div style='margin-left:30px; border:1px solid black;background:yellow;color:red;'><br />
                                        [
,<br /><b>Sınıf:</b> {0} <br /> <b>Metod:</b> {1} 
                                        <br /> <b>Exception Type:</b> {2} <br /> <b>Our Details:</b> {3}<br />]<br /><div>",
                 methodbase.ReflectedType.Name, methodbase.Name, exType.ToString(), errorDesc == null ? "Yok" : errorDesc);
            return formattedException;
        }
 /// <summary>
 /// Kodun patladığı yeri formatlamak için
 /// </summary>
 /// <param name="methodbase">Çağıran metod bilgisi. </param>
 /// <param name="errorDesc">Hata için bizim açıklamamız</param>
 /// <param name="ex">Hata sınıfı</param>
 /// <param name="exType">Hata tipi</param>
 /// <returns>Geriye formatlanmış hatayı döner</returns>
 public string FormatExceptionThrowCatch(MethodBase methodbase, string errorDesc, System.Exception ex, ExceptionTypes exType)
 {
     //istenildiği takdirde hatanın daha derin detayları burada tek bir noktadan 
     //eklenebilir veya formatlanabilir.
     string formattedException = string.Format(@"
                     Sınıf: {0} ,\n
                     Metod: {1} ,\n
                     Exception Type: {2} ,\n 
                     Our Details: {3}",
          methodbase.ReflectedType.Name, methodbase.Name, exType.ToString(), errorDesc == null ? "Yok" : errorDesc);
     return formattedException;
 }
        /// <summary>
        /// Kodun patladığı yeri formatlamak için
        /// </summary>
        /// <param name="methodbase">Çağıran metod bilgisi. </param>
        /// <param name="errorDesc">Hata için bizim açıklamamız</param>
        /// <param name="ex">Hata sınıfı</param>
        /// <param name="exType">Hata tipi</param>
        /// <returns>Geriye formatlanmış hatayı döner</returns>
        public string FormatExceptionThrowCatch(MethodBase methodbase, string errorDesc, System.Exception ex, ExceptionTypes exType)
        {
            //istenildiği takdirde hatanın daha derin detayları burada tek bir noktadan
            //eklenebilir veya formatlanabilir.
            string formattedException = string.Format(@"
                            Sınıf: {0} ,\n
                            Metod: {1} ,\n
                            Exception Type: {2} ,\n 
                            Our Details: {3}",
                                                      methodbase.ReflectedType.Name, methodbase.Name, exType.ToString(), errorDesc == null ? "Yok" : errorDesc);

            return(formattedException);
        }
        /// <summary>
        /// Kodun patladığı yeri formatlamak için
        /// </summary>
        /// <param name="methodbase">Çağıran metod bilgisi. </param>
        /// <param name="errorDesc">Hata için bizim açıklamamız</param>
        /// <param name="ex">Hata sınıfı</param>
        /// <param name="exType">Hata tipi</param>
        /// <returns>Geriye formatlanmış hatayı döner</returns>
        public string FormatExceptionThrowCatch(MethodBase methodbase, string errorDesc, System.Exception ex, ExceptionTypes exType)
        {
            //istenildiği takdirde hatanın daha derin detayları burada tek bir noktadan
            //eklenebilir veya formatlanabilir.
            string formattedException = string.Format(@"<div style='margin-left:30px; border:1px solid black;background:yellow;color:red;'><br />
                                        [
,<br /><b>Sınıf:</b> {0} <br /> <b>Metod:</b> {1} 
                                        <br /> <b>Exception Type:</b> {2} <br /> <b>Our Details:</b> {3}<br />]<br /><div>",
                                                      methodbase.ReflectedType.Name, methodbase.Name, exType.ToString(), errorDesc == null ? "Yok" : errorDesc);

            return(formattedException);
        }
Ejemplo n.º 5
0
 public ComException(ExceptionTypes exTypes, string msg,Exception innerException=null) : base(msg,innerException)
 {
     ExceptionCode = exTypes.ToString();
 }