private void TryWork(PumpMessage work) { try { work.Execute(); if (work.Deferred != null) { work.Deferred.Resolve(); } } catch (Exception ex) { work.Deferred?.Reject(ex); PumpExceptionArgs exceptionArgs = new PumpExceptionArgs(ex); PumpException.Fire(exceptionArgs); if (exceptionArgs.Handled == false) { if (ex.InnerException != null) { ExceptionDispatchInfo.Capture(ex.InnerException).Throw(); } else { ExceptionDispatchInfo.Capture(ex).Throw(); } } } }
private void TryWork(PumpMessage work) { try { work.Execute(); } catch (Exception ex) { PumpExceptionArgs exceptionArgs = new PumpExceptionArgs(ex); PumpException.Fire(exceptionArgs); if (exceptionArgs.Handled == false) { if (ex.InnerException != null) { ExceptionDispatchInfo.Capture(ex.InnerException).Throw(); } else { ExceptionDispatchInfo.Capture(ex).Throw(); } } } #if PROFILING CliProfiler.Instance.TotalMessagesProcessed++; #endif }
private void TryWork(PumpMessage work) { try { work.Execute(); } catch (Exception ex) { PumpExceptionArgs exceptionArgs = new PumpExceptionArgs(ex); PumpException.Fire(exceptionArgs); if (exceptionArgs.Handled == false) { throw; } } #if PROFILING CliProfiler.Instance.TotalMessagesProcessed++; #endif }