Beispiel #1
0
 async Task GetReturnValue()
 {
     try
     {
         await task;
     }
     catch (Exception ex)
     {
         invocationInfo.Exception = ex;
         Logger.Fatal("{target} failed: {exception}", invocationInfo, InvocationFailed.ShortMessage(ex));
         throw new InvocationFailed(ex, invocationInfo);
     }
     finally
     {
         invocationInfo.Complete();
     }
 }
Beispiel #2
0
 async Task <Result> GetReturnValue()
 {
     try
     {
         var r = await task;
         r = (Result)invocationInfo.InterceptReturnValue(r);
         return(r);
     }
     catch (Exception ex)
     {
         invocationInfo.Exception = ex;
         Logger.Fatal("{target} failed: {exception}", invocationInfo, InvocationFailed.ShortMessage(ex));
         throw new InvocationFailed(ex, invocationInfo);
     }
     finally
     {
         invocationInfo.Complete();
     }
 }