ExcelFormulaParser.Engine.Excel.Functions.ExcelFunction.ThrowExcelFunctionExceptionIf C# (CSharp) Method

ThrowExcelFunctionExceptionIf() protected method

protected ThrowExcelFunctionExceptionIf ( Func condition, ExcelErrorCodes code ) : void
condition Func
code ExcelFormulaParser.Engine.Exceptions.ExcelErrorCodes
return void
        protected void ThrowExcelFunctionExceptionIf(Func<bool> condition, ExcelErrorCodes code)
        {
            if (condition())
            {
                throw new ExcelFunctionException("An excel function error occurred", code);
            }
        }