Example #1
0
        private bool TreatException(Exception exception)
        {
            if (!(exception is DeserializationException) && !(exception is ProductionException))
            {
                var response = streamConfig.InnerExceptionHandler(exception);
                if (response == ExceptionHandlerResponse.FAIL)
                {
                    Close(false);
                    if (ThrowException)
                    {
                        throw new StreamsException(exception);
                    }
                    return(true);
                }
                else if (response == ExceptionHandlerResponse.CONTINUE)
                {
                    return(false);
                }
                else
                {
                    return(true);
                }
            }
            else
            {
                Close(false);
                if (ThrowException)
                {
                    throw new StreamsException(exception);
                }

                return(true);
            }
        }
        private ExceptionHandlerResponse TreatException(Exception exception)
        {
            if (exception is DeserializationException || exception is ProductionException)
            {
                return(ExceptionHandlerResponse.FAIL);
            }
            var response = streamConfig.InnerExceptionHandler(exception);

            return(response);
        }
        private ExceptionHandlerResponse TreatException(Exception exception)
        {
            if (exception is DeserializationException || exception is ProductionException)
            {
                Close(false);
                if (ThrowException)
                {
                    throw new StreamsException(exception);
                }
                return(ExceptionHandlerResponse.FAIL);
            }
            var response = streamConfig.InnerExceptionHandler(exception);

            if (response == ExceptionHandlerResponse.FAIL)
            {
                Close(false);
                if (ThrowException)
                {
                    throw new StreamsException(exception);
                }
            }
            return(response);
        }