c# - Do I need to wrap Trace.TraceError inside a try/catch? -


I am using system.Diagnostics.Trace # TraceError / inside an attempt to trace errors. Looking at the implementation of TraceError, it seems that the errors of the audience are not really caught, it means that I should write the code written below to avoid the logging errors to promote the caller:

  hold (exception e) {try {trace.TraceError (e); } Hold {// nothing}}    

is not documented to throw exceptions Therefore, there is no need to hold However, if it has been documented to throw exception, you should never do exception and do not do anything.

Increase the exception, only then you have a chance to know what is wrong.

View

Comments

Popular posts from this blog

c# - Textbox not clickable but editable -

Matlab transpose a table vector -

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -