自定义新的Exception

namespace MEDAdapter
{
    [global::System.Serializable]
    public class ServiceConfigException : Exception
    {
        //
        // For guidelines regarding the creation of new exception types, see
        //    http://msdn.microsoft.com/library/default.asp?url=/library/en-  us/cpgenref/html/cpconerrorraisinghandlingguidelines.asp
        // and
        //    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncscol/html/csharp07192001.asp
        //

        public ServiceConfigException() { }
        public ServiceConfigException(string message) : base(message) { }
        public ServiceConfigException(string message, Exception inner) : base(message, inner) { }
        protected ServiceConfigException(
          System.Runtime.Serialization.SerializationInfo info,
          System.Runtime.Serialization.StreamingContext context)
            : base(info, context) { }
    }
}

posted on 2010-09-01 17:27  源远流长  阅读(163)  评论(0编辑  收藏  举报

导航