c# - Printing the stack trace only when an exception thrown -
i developing own automated bug reporting system project, want know is there way stack trace of program when exception thrown, know how full stack trace file in case need catch stack trace exception (stack trace relevant exception), please direct me. if there code sample, grate!
code used stack trace below
stacktrace st = new stacktrace(); richtextbox1.text = st.tostring(); thanx in adavance! using below technologies in project c#, .net 4.0.
the exception object has stacktrace property can use stack trace exception when caught.
try { // code } catch (exception ex) { richtextbox1.text = ex.stacktrace; }
Comments
Post a Comment