Which is the proper way to logging an exception in silverlight.?
I want to log an exception in silverlight application. So I have created the My framework for excption logginn on server side and i m logging an errors using WCF method. I have seen an artilcle in which they have given an procdure for exception logging in silverlight that is below
private void btnClick_Open(object sender, RoutedEventArgs e)
{
try
{
//Code.......
}
catch(Exception ex)
{
//Calling exception logging from catch block.
webService.LogExceptionAsync(ex.message);
webService.LogExceptionCompleted+=new EventHandler<LogExceptionCompletedEventArgs>(webService.LogExceptionCompleted);
}
}
public void webService_LogExceptionCompleted(object sender, LogExceptionCompletedEventArgs e)
{
e.Handle = true;
}
Is this the proper way to log an exception or is there another standerd way to log an erros..?