aboutsummaryrefslogtreecommitdiff
path: root/quality_control/errors.py
diff options
context:
space:
mode:
Diffstat (limited to 'quality_control/errors.py')
-rw-r--r--quality_control/errors.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/quality_control/errors.py b/quality_control/errors.py
index 29a38f9..1eda646 100644
--- a/quality_control/errors.py
+++ b/quality_control/errors.py
@@ -1,5 +1,7 @@
"""Hold exceptions for QC package"""
+from collections import namedtuple
+
class InvalidCellValue(Exception):
"""Raised when a function encounters an invalid value"""
@@ -22,3 +24,9 @@ class ParseError(Exception):
"""Raised if any of the above exceptions are raised"""
def __init__(self, *args):
super().__init__(*args)
+
+InvalidValue = namedtuple(
+ "InvalidValue", ("line_number", "column_number", "value", "message"))
+
+DuplicateHeading = namedtuple(
+ "InvalidValue", ("line_number", "heading", "columns","message"))