自定义新的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) { }
}
}