Thursday, September 17, 2015

Good, Clean Code Helps With Error Resolution

Stack dumps can contain useful information about an exception. They can also be vague and misleading, especially if we have bloated classes and/or methods.


A stack trace can only go so far as to show which methods were called on which classes and in what order. Sometimes there is a line number but if not and we have a lot of lines in a specific method it can take a lot of guessing to find the culprit.


In .NET, for example, private methods are not included in the trace. Protected and up methods are. So, following good practices an improve usefulness of a stack trace.

No comments:

Post a Comment