123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
- #region --------------- Copyright Dresser Wayne Pignone -------------
- #endregion
- using System;
- namespace Wayne.Lib.Log
- {
-
-
-
- [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2237:MarkISerializableTypesWithSerializable")]
- [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1032:ImplementStandardExceptionConstructors")]
- public class LogException : Exception
- {
- #region Fields
- private LogExceptionType type;
- #endregion
- #region Construction
-
-
-
- public LogException(LogExceptionType type)
- {
- this.type = type;
- }
-
-
-
- public LogException(LogExceptionType type, string message)
- : base(message)
- {
- this.type = type;
- }
-
-
-
- public LogException(LogExceptionType type, string message, Exception inner)
- : base(message, inner)
- {
- this.type = type;
- }
- #endregion
- #region Properties
-
-
-
- public LogExceptionType LogExceptionType
- {
- get { return type; }
- }
- #endregion
- #region Methods
-
-
-
- public override string Message
- {
- get
- {
- return string.Format(System.Globalization.CultureInfo.InvariantCulture, "{0}: \"{1}\"", type, base.Message);
- }
- }
-
-
-
-
- public override string ToString()
- {
- return string.Format(System.Globalization.CultureInfo.InvariantCulture, "LogException({0}){1}", type, base.ToString());
- }
- #endregion
- }
- }
|