From 94cec539dc92cda1900cf690fd472c7724802e00 Mon Sep 17 00:00:00 2001 From: Schamper <1254028+Schamper@users.noreply.github.com> Date: Fri, 8 Dec 2023 16:39:15 +0100 Subject: [PATCH] Catch and re-raise errors when opening filesystems --- dissect/target/filesystem.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dissect/target/filesystem.py b/dissect/target/filesystem.py index ab189ccba..b45ad6e93 100644 --- a/dissect/target/filesystem.py +++ b/dissect/target/filesystem.py @@ -1533,6 +1533,8 @@ def open(fh: BinaryIO, *args, **kwargs) -> Filesystem: except ImportError as e: log.info("Failed to import %s", filesystem) log.debug("", exc_info=e) + except Exception as e: + raise FilesystemError(f"Failed to open filesystem for {fh}", cause=e) finally: fh.seek(offset)