Line | |
---|
1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using System.Linq;
|
---|
4 | using System.Text;
|
---|
5 |
|
---|
6 | namespace OfficeOpenXml.FormulaParsing.Exceptions
|
---|
7 | {
|
---|
8 | /// <summary>
|
---|
9 | /// This Exception represents an Excel error. When this exception is thrown
|
---|
10 | /// from an Excel function, the ErrorValue code will be set as the value of the
|
---|
11 | /// parsed cell.
|
---|
12 | /// </summary>
|
---|
13 | /// <seealso cref="ExcelErrorValue"/>
|
---|
14 | public class ExcelErrorValueException : Exception
|
---|
15 | {
|
---|
16 |
|
---|
17 | public ExcelErrorValueException(ExcelErrorValue error)
|
---|
18 | : this(error.ToString(), error)
|
---|
19 | {
|
---|
20 |
|
---|
21 | }
|
---|
22 |
|
---|
23 | public ExcelErrorValueException(string message, ExcelErrorValue error)
|
---|
24 | : base(message)
|
---|
25 | {
|
---|
26 | ErrorValue = error;
|
---|
27 | }
|
---|
28 |
|
---|
29 | public ExcelErrorValueException(eErrorType errorType)
|
---|
30 | : this(ExcelErrorValue.Create(errorType))
|
---|
31 | {
|
---|
32 |
|
---|
33 | }
|
---|
34 |
|
---|
35 | /// <summary>
|
---|
36 | /// The error value
|
---|
37 | /// </summary>
|
---|
38 | public ExcelErrorValue ErrorValue { get; private set; }
|
---|
39 | }
|
---|
40 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.