如何全面的把握一个系统的异常处理
生活随笔
收集整理的這篇文章主要介紹了
如何全面的把握一个系统的异常处理
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
對于一個大的系統來說,異常處理必須要有一個總的策略和方針,并在組織內貫徹執行,否則就很難把異常處理好。
[Serializable]
public class ExampleException : ApplicationException
{
public ExampleException()
: base()
{
}
public ExampleException(string message)
: base(message)
{
}
public ExampleException(string message, Exception inner) :
base(message, inner)
{
}
protected ExampleException(SerializationInfo info, StreamingContext context) :
base(info, context)
{
}
}
{
//Read configuration from file
...
}
catch (FileNotFoundException ex)
{
throw new ExampleException("Can't find the configration file.", ex);
}
轉載于:https://www.cnblogs.com/zanxiaofeng/archive/2012/02/17/Exception.html
創作挑戰賽新人創作獎勵來咯,堅持創作打卡瓜分現金大獎總結
以上是生活随笔為你收集整理的如何全面的把握一个系统的异常处理的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: iPhone开发 调用阿asp.net程
- 下一篇: windows 虚拟地址映射到物理地址