private static bool RequiresInnerExceptionPassing(ThrowStatementModel throwStatementModel)
        {
            if (!throwStatementModel.IsDirectExceptionInstantiation)
            {
                return(false);
            }

            if (throwStatementModel.IsRethrow)
            {
                return(false);
            }

            var outerCatchClause = throwStatementModel.FindOuterCatchClause();

            if (outerCatchClause == null)
            {
                return(false);
            }

            if (!outerCatchClause.IsExceptionTypeSpecified)
            {
                return(true);
            }

            if (!outerCatchClause.HasVariable)
            {
                return(true);
            }

            return(!throwStatementModel.IsInnerExceptionPassed(outerCatchClause.Variable.VariableName.Name));
        }
        private static bool RequiresInnerExceptionPassing(ThrowStatementModel throwStatementModel)
        {
            if (!throwStatementModel.IsDirectExceptionInstantiation)
                return false;

            if (throwStatementModel.IsRethrow)
                return false;

            var outerCatchClause = throwStatementModel.FindOuterCatchClause();
            if (outerCatchClause == null)
                return false;

            if (!outerCatchClause.IsExceptionTypeSpecified)
                return true;

            if (!outerCatchClause.HasVariable)
                return true;

            return !throwStatementModel.IsInnerExceptionPassed(outerCatchClause.Variable.VariableName.Name);
        }