Exceptions handler documentation¶
- Created on: 16.07.2019
- Author: Ayoub Malek
-
class
src.ExceptionsHandler.
ExceptionsHandler
(args, data)[source]¶ Bases:
object
Handle all exceptions caused by incorrect commands.
-
args
¶ dict – dictionray of command arguments.
-
data
¶ pandas.DataFrame – loaded data from csv.
-
supported_actions
¶ list – list of supported actions.
-
exception
¶ dict – dictionary of the exception descriptions.
-
check_action
()[source]¶ Check parsed action argument and raise exception if the action is not supported or if no action is provided.
-
check_device_id
()[source]¶ Check parsed device id argument and raise exception if there is no such id in data.
-
check_measurement_name
()[source]¶ Check parsed measurement name argument and raise error if no such measurement name in data.
-
check_timestamp
()[source]¶ Check parsed timestamp arguments and raise exception in case of wrong format or wrong chronological order.
-