diff --git a/utils/dump_sessionstorage.py b/utils/dump_sessionstorage.py index 1946fed..d6ae250 100644 --- a/utils/dump_sessionstorage.py +++ b/utils/dump_sessionstorage.py @@ -32,14 +32,12 @@ def process_db(filepath, output_path): - # Do some basic error handling - p = Path(filepath) if not p.exists(): - raise Exception("Given file path does not exists. Path: {}".format(filepath)) + raise FileNotFoundError(f"Given file path does not exist. Path: {filepath}") if not p.is_dir(): - raise Exception("Given file path is not a folder. Path: {}".format(filepath)) + raise NotADirectoryError(f"Given file path is not a folder. Path: {filepath}") # convert the database to a python list with nested dictionaries extracted_values = shared.parse_sessionstorage(p)