开发者

.NET/Winforms: need an example for a nice UI for exception displaying

I'm writing a little developer tool which will (among other things) display exceptions thrown from the code that the tool is currently inspecting. Since it is a developer tool I would like to display as much information about the exception as possible (at the least type, message, stack trace and a recur开发者_如何学编程sive InnerException) and do it in a way that is easy to comprehend and analyze.

Unfortunately I cannot think of a nice UI for this. Are there any good examples out there? I have access to DevExpress components if that helps.


Starting with the VS display, I'd look for:

  • omit null values (such as HelpLink == null, or InnerException==null)
  • Don't nest InnerException, it's basically a stack so represent it as such
  • In StackTrace, you could make the file name clickable (or at least easy to pick out and copy).
  • In StackTrace, Emphasizing the actual class and function name to make it stick out from the full namespace and signature garble.
  • Some more data reduction is possible, e.g. exception type displayed twice, but this takes careful handling not to swallow information either

You could consider a HTML view, either making it interactive by catching clicks, or using javascript.


Well the Visual Studio one does a fair job! I can't seem to upload an image from this PC, but there's an image here if you haven't seen it.

Everything shown in a dynamic table/tree-like structure, you can drill down into inner exceptions etc, everything is copyable, and there are expandable viewers for certain things (e.g. stack traces). Not pretty, but functional.


Whatever you do, make sure that the developer can copy and paste all the relevant information!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜