using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace OfficeOpenXml.FormulaParsing.Exceptions { /// /// This Exception represents an Excel error. When this exception is thrown /// from an Excel function, the ErrorValue code will be set as the value of the /// parsed cell. /// /// public class ExcelErrorValueException : Exception { public ExcelErrorValueException(ExcelErrorValue error) : this(error.ToString(), error) { } public ExcelErrorValueException(string message, ExcelErrorValue error) : base(message) { ErrorValue = error; } public ExcelErrorValueException(eErrorType errorType) : this(ExcelErrorValue.Create(errorType)) { } /// /// The error value /// public ExcelErrorValue ErrorValue { get; private set; } } }