














try
{
}
catch (System.Exception e)
{
throw new System.Exception("error",e);
}
catch
{
throw;
}
finally
{
}
抛出异常
throw e;
自定义异常
public class WidgetException:System.ApplicationException
{
Widget mWidget;
public Widget ErrorWidget
{
get
{
return mWidget;
}
}
public WidgetException(Widget W, string s) :base(S)
{
mWidget = w;
}
}
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。