From 97de330ccf466fb5bbcda2d22a1e7331e227c89f Mon Sep 17 00:00:00 2001 From: Théo de la Hogue Date: Tue, 20 Sep 2022 15:45:17 +0200 Subject: Defining custom exceptions. --- src/argaze/AreaOfInterest/AOIFeatures.py | 4 ++++ src/argaze/GazeFeatures.py | 4 ++++ 2 files changed, 8 insertions(+) (limited to 'src') 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.""" -- cgit v1.1