spreadsheet
typeScript/javascript spreadsheet parser, with formulas.
git clone https://git.vogt.world/spreadsheet.git
Log | Files | README.md
← Commit log
commit
message
[Errors] adding docs
author
Ben Vogt <[email protected]>
date
2018-02-10 03:48:03
stats
1 file(s) changed, 24 insertions(+), 0 deletions(-)
files
src/Errors.ts
 1diff --git a/src/Errors.ts b/src/Errors.ts
 2index 23141ca..cf7a7b3 100644
 3--- a/src/Errors.ts
 4+++ b/src/Errors.ts
 5@@ -7,6 +7,9 @@ let NUM_ERROR = "#NUM!";
 6 let NA_ERROR = "#N/A";
 7 let PARSE_ERROR = "#ERROR";
 8 
 9+/**
10+ * Execution or parsing produced a null value, or intersection of ranges produced zero cells.
11+ */
12 class NullError extends Error {
13   constructor(message: string) {
14     super(message);
15@@ -14,6 +17,9 @@ class NullError extends Error {
16   }
17 }
18 
19+/**
20+ * Attempt to divide by zero, including division by an empty cell.
21+ */
22 class DivZeroError extends Error {
23   constructor(message: string) {
24     super(message);
25@@ -21,6 +27,9 @@ class DivZeroError extends Error {
26   }
27 }
28 
29+/**
30+ * Parameter is wrong type, or value is incompatible, or cannot be parsed, converted, or manipulated.
31+ */
32 class ValueError extends Error {
33   constructor(message: string) {
34     super(message);
35@@ -28,6 +37,9 @@ class ValueError extends Error {
36   }
37 }
38 
39+/**
40+ * Reference to invalid cell, range, or empty range.
41+ */
42 class RefError extends Error {
43   constructor(message: string) {
44     super(message);
45@@ -35,6 +47,9 @@ class RefError extends Error {
46   }
47 }
48 
49+/**
50+ * Unrecognized/deleted name.
51+ */
52 class NameError extends Error {
53   constructor(message: string) {
54     super(message);
55@@ -42,6 +57,9 @@ class NameError extends Error {
56   }
57 }
58 
59+/**
60+ * Failed to meet domain constraints (e.g., input number too high or too low).
61+ */
62 class NumError extends Error {
63   constructor(message: string) {
64     super(message);
65@@ -49,6 +67,9 @@ class NumError extends Error {
66   }
67 }
68 
69+/**
70+ * Lookup functions which failed and NA() return this value.
71+ */
72 class NAError extends Error {
73   constructor(message: string) {
74     super(message);
75@@ -56,6 +77,9 @@ class NAError extends Error {
76   }
77 }
78 
79+/**
80+ * Input could not be parsed.
81+ */
82 class ParseError extends Error {
83   constructor(message: string) {
84     super(message);