try
{
return myService.GetData();
}
catch (Exception ex)
{
Log.Error(ex.ToString());
throw; // this will be caught by the global exception handler anyway,
// so we just end up logging the exception twice
}
try
{
return myService.GetData();
}
catch (MyServiceException ex)
{
var betterEx = new MyApplicationException("Something bad happened with myService")
{
InnerException = ex,
UserInfo = userInfo
}
throw betterEx;
}