From 1de552ea94706ce75ff9464c1af7f1886bc6d73e Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Mon, 29 Aug 2022 15:14:03 -0400 Subject: [PATCH] Island: Add UnknownRecordError to repository.errors --- monkey/monkey_island/cc/repository/__init__.py | 2 +- monkey/monkey_island/cc/repository/errors.py | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/monkey/monkey_island/cc/repository/__init__.py b/monkey/monkey_island/cc/repository/__init__.py index 075317b43..a57518abf 100644 --- a/monkey/monkey_island/cc/repository/__init__.py +++ b/monkey/monkey_island/cc/repository/__init__.py @@ -1,4 +1,4 @@ -from .errors import RemovalError, RetrievalError, StorageError +from .errors import RemovalError, RetrievalError, StorageError, UnknownRecordError from .i_file_repository import FileNotFoundError, IFileRepository diff --git a/monkey/monkey_island/cc/repository/errors.py b/monkey/monkey_island/cc/repository/errors.py index aeb9fa23c..986d3007a 100644 --- a/monkey/monkey_island/cc/repository/errors.py +++ b/monkey/monkey_island/cc/repository/errors.py @@ -20,3 +20,9 @@ class StorageError(RuntimeError): """ pass + + +class UnknownRecordError(RuntimeError): + """ + Raised when the repository does not contain any data matching the request. + """