I would like to create a nicely formatted logging exception line. When doing this from silverlight, options like nlog ( not yet ), log4net is not an option.
Anyone who has seen the code creates something like:
ExceptionType: xxxx
Message: xxxx
StackTrace: XXX
InnerException
ExceptionType: xxxx
Message: xxxx
StackTrace: XXX
I am writing now myself, just hoping that the code there will do something nicer.
UPDATE : I was just about to close this q, because I came to the same conclusion as Zack, but I'm not going to deprive Zach of points! :)
.ToString () looks like this:
System.Exception: I can't handle this ---> System.DivideByZeroException: Attempted to divide by zero.
at MuckingAround.RussTest_Click (Object sender, RoutedEventArgs e)
--- End of inner exception stack trace ---
at MuckingAround.RussTest_Click (Object sender, RoutedEventArgs e)
at System.Windows.Controls.Primitives.ButtonBase.OnClick ()
at System.Windows.Controls.Button.OnClick ()
at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp (MouseButtonEventArgs e)
at System.Windows.Controls.Control.OnMouseLeftButtonUp (Control ctrl, EventArgs e)
at MS.Internal.JoltHelper.FireEvent (IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, String eventName)
source
share