Esempio n. 1
0
        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();
                    }
                }
            }
        }
Esempio n. 2
0
        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
        }
Esempio n. 3
0
        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
        }