在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
本文整理汇总了VB.NET中System.Exception.GetBaseException方法的典型用法代码示例。如果您正苦于以下问题:VB.NET Exception.GetBaseException方法的具体用法?VB.NET Exception.GetBaseException怎么用?VB.NET Exception.GetBaseException使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类 在下文中一共展示了Exception.GetBaseException方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的VB.NET代码示例。 示例1: New
开发者ID:VB.NET开发者,项目名称:System,代码行数:88,代码来源:Exception.GetBaseException 输出: The program forces a division by 0, then throws the exception twice more, using a different derived exception each time: Unwind the nested exceptions using the InnerException property: NDP_UE_VB.ThirdLevelException: Caught the second exception and threw a third in response. ---> NDP_UE_VB.SecondLevelException: Forced a division by 0 and threw a second exception. ---> System.DivideByZeroException: Attempted to div ide by zero. at NDP_UE_VB.NestedExceptions.DivideBy0() --- End of inner exception stack trace --- at NDP_UE_VB.NestedExceptions.DivideBy0() at NDP_UE_VB.NestedExceptions.Rethrow() --- End of inner exception stack trace --- at NDP_UE_VB.NestedExceptions.Rethrow() at NDP_UE_VB.NestedExceptions.Main() NDP_UE_VB.SecondLevelException: Forced a division by 0 and threw a second exc eption. ---> System.DivideByZeroException: Attempted to divide by zero. at NDP_UE_VB.NestedExceptions.DivideBy0() --- End of inner exception stack trace --- at NDP_UE_VB.NestedExceptions.DivideBy0() at NDP_UE_VB.NestedExceptions.Rethrow() System.DivideByZeroException: Attempted to divide by zero. at NDP_UE_VB.NestedExceptions.DivideBy0() Display the base exception using the GetBaseException method: System.DivideByZeroException: Attempted to divide by zero. at NDP_UE_VB.NestedExceptions.DivideBy0() 注:本文中的System.Exception.GetBaseException方法示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论