From c058c62bba29f93f5c34e4ccbeb9ec99bf1ed8e8 Mon Sep 17 00:00:00 2001 From: Chen Zhang Date: Fri, 1 Mar 2024 10:39:31 -0500 Subject: [PATCH] better error message during file loading --- src/imars3d/backend/dataio/data.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/imars3d/backend/dataio/data.py b/src/imars3d/backend/dataio/data.py index 5b92cbdf..3d276288 100644 --- a/src/imars3d/backend/dataio/data.py +++ b/src/imars3d/backend/dataio/data.py @@ -227,8 +227,8 @@ def _forgiving_reader( """ try: return reader(filename) - except Exception: - logger.error(f"Cannot read {filename}, skipping.") + except Exception as e: + logger.error(f"While reading {filename}, the following error occurred: {e}") return None