什么是显示完整的InnerException的正确方法? [英] What is the proper way to display the full InnerException?

查看:2037
本文介绍了什么是显示完整的InnerException的正确方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是展示我的全部的InnerException

我发现我的一些InnerExceptions有正确的方法另一个的InnerException 和去对相当深。

I found that some of my InnerExceptions has another InnerException and that go's on pretty deep.

威尔 InnerException.ToString()做的工作,我还是我通过 InnerExceptions 需要循环,并建立了一个字符串的StringBuilder

Will InnerException.ToString() do the job for me or do i need to loop through the InnerExceptions and build up a String with StringBuilder?

推荐答案

您可以简单地打印 exception.ToString() - 这也将包括所有的嵌套的InnerException 取值

You can simply print exception.ToString() -- that will also include the full text for all the nested InnerExceptions.

这篇关于什么是显示完整的InnerException的正确方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆