//return InnerException
private Exception GetInnerException(Exception ex)
{
if (ex.InnerException != null)
{
return GetInnerException(ex.InnerException);
}
return ex;
}
//return InnerExceptionMessage
private string GetInnerException(Exception ex)
{
if (ex.InnerException != null)
{
return GetInnerException(ex.InnerException);
}
return ex.Message;
}
c#获取异常对象最内层的报错信息
最新推荐文章于 2024-07-15 10:11:51 发布