aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThéo de la Hogue2022-09-20 15:45:17 +0200
committerThéo de la Hogue2022-09-20 15:45:17 +0200
commit97de330ccf466fb5bbcda2d22a1e7331e227c89f (patch)
treec455b5fdd2360473bd06ebbe813180045129e96e /src
parente7a5f5b24277643377aab39222206ce48a51168f (diff)
downloadargaze-97de330ccf466fb5bbcda2d22a1e7331e227c89f.zip
argaze-97de330ccf466fb5bbcda2d22a1e7331e227c89f.tar.gz
argaze-97de330ccf466fb5bbcda2d22a1e7331e227c89f.tar.bz2
argaze-97de330ccf466fb5bbcda2d22a1e7331e227c89f.tar.xz
Defining custom exceptions.
Diffstat (limited to 'src')
-rw-r--r--src/argaze/AreaOfInterest/AOIFeatures.py4
-rw-r--r--src/argaze/GazeFeatures.py4
2 files changed, 8 insertions, 0 deletions
diff --git a/src/argaze/AreaOfInterest/AOIFeatures.py b/src/argaze/AreaOfInterest/AOIFeatures.py
index 087b3f3..8bf546f 100644
--- a/src/argaze/AreaOfInterest/AOIFeatures.py
+++ b/src/argaze/AreaOfInterest/AOIFeatures.py
@@ -208,3 +208,7 @@ class TimeStampedAOIScenes(DataStructures.TimeStampedBuffer):
raise ValueError(f'value must inherit from AOIScene')
super().__setitem__(key, value)
+
+class AOISceneMissing(Exception):
+ """Exception to raise when aoi scene can't be processed."""
+ pass
diff --git a/src/argaze/GazeFeatures.py b/src/argaze/GazeFeatures.py
index 0cf586d..acdbec8 100644
--- a/src/argaze/GazeFeatures.py
+++ b/src/argaze/GazeFeatures.py
@@ -27,6 +27,10 @@ class TimeStampedGazeAccuracies(DataStructures.TimeStampedBuffer):
def __setitem__(self, key, value: GazeAccuracy):
super().__setitem__(key, value)
+class InvalidGazeData(Exception):
+ """Exception to raise when gaze position or accuracy can't be processed."""
+ pass
+
@dataclass
class Movement():
"""Define abstract movement class."""