Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

2
  • I love the TryXXX pattern in .net. Commented Jan 3, 2009 at 21:50
  • This is a pretty good pattern, but since you are rethrowing the exception, a far better pattern (for the second case) is to wrap the exception with another saying "unable to convert hexadecimal" and throwing that, and then do all the logging at the bottom level. No need to log here, in fact it is likely to produce duplications in the log. Wrap and rethrow and log at the rootmost level is the best. agiletribe.purplehillsbooks.com/2018/05/01/… Commented Mar 7, 2024 at 22:17