[MonoDevelop] Why not log all exceptions in MonoDevelop?

Jamie Zhu zhujm.home at gmail.com
Fri Aug 29 01:49:04 UTC 2014

Thanks, Grep!

The link you provided is very useful for me!


On Fri, Aug 29, 2014 at 7:25 AM, Greg Zapp <greg.zapp at gmail.com> wrote:

> I can't speak for the monodevelop team, but in the .net/c# world it's much
> more common to use exceptions for general error handling due to... reasons.
>  The primary I can think of being Microsoft's guidelines for exception use:
> "One common concern related to exceptions is that if exceptions are used
> for code that routinely fails, the performance of the implementation will
> be unacceptable."
> "X DO NOT use error codes because of concerns that exceptions might
> affect performance negatively."
> - http://msdn.microsoft.com/en-us/library/ms229009(v=vs.110).aspx
> My guess here being that logging all exceptions would produce a ton of
> garbage and make it hard to zoom in on real issues.
> -Greg
> On Fri, Aug 29, 2014 at 3:04 AM, Benjamin ZHU <zhujm.home at gmail.com>
> wrote:
>> Dear MonoDevelop team,
>> I'm Jamie, a PhD student working on logging practices in software
>> development. Logging is a common programming practice used to assist in
>> tracking down bugs or unexpected behaviour. Currently, I have used
>> MonoDevelop as a target project and studied the logging statistics from its
>> source code.
>> Exceptions are generally used to capture the exceptional conditions that
>> disrupt the normal flow of code execution. Exception logging is important,
>> because these logs can provide strong indicators of the error sites and are
>> helpful at determining what went wrong. Some advocators point out that
>> logging all exceptions can greatly reduce the diagnosis time of
>> post-release failures. Also, logging all exceptions will not incur much
>> runtime overhead, because compared to other statements, the execution of
>> exception-handling code is much rarer during normal runs.
>> However, in my study in MonoDevelop, there are 4041 catch-blocks in total
>> and only 771 (19%) of them are logged. A significant portion of
>> catch-blocks are actually not logged. So I have the question:
>> 1. How to decide whether to log an exception during development? What are
>> the concerns?
>> 2. Why not log all exceptions? If doing so, what problems can be caused?
>> Thank you very much! Your reply can broaden my understanding on exception
>> logging.
>> Regards,
>> Jamie Zhu
>> _______________________________________________
>> Monodevelop-list mailing list
>> Monodevelop-list at lists.ximian.com
>> http://lists.ximian.com/mailman/listinfo/monodevelop-list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/monodevelop-list/attachments/20140829/ea2b9cc5/attachment.html>

More information about the Monodevelop-list mailing list