From eb6e1b4b1853111feb234523c84129d3f2f738a5 Mon Sep 17 00:00:00 2001 From: Alexander Goscinski Date: Sun, 2 Feb 2025 09:50:32 +0100 Subject: [PATCH] add back exception for a bit context --- src/aiida/manage/configuration/config.py | 2 +- tests/manage/configuration/test_config.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/aiida/manage/configuration/config.py b/src/aiida/manage/configuration/config.py index 08d84f7ffe..6bfb15fef6 100644 --- a/src/aiida/manage/configuration/config.py +++ b/src/aiida/manage/configuration/config.py @@ -532,7 +532,7 @@ def create_profile( profile.storage_cls.initialise(profile) except Exception as exception: raise StorageMigrationError( - f'During initialisation of storage backend. Please check above traceback for cause.' + f'During initialisation of storage backend following excepion was raised: {exception}.\n Please check above for full traceback.' ) LOGGER.report('Storage initialisation completed.') diff --git a/tests/manage/configuration/test_config.py b/tests/manage/configuration/test_config.py index 7868b85398..ae860130dd 100644 --- a/tests/manage/configuration/test_config.py +++ b/tests/manage/configuration/test_config.py @@ -460,7 +460,7 @@ def raise_storage_migration_error(*_, **__): with pytest.raises(ValueError, match=r'The entry point `.*` could not be loaded'): config.create_profile(profile_name, 'core.non_existant', {}) - with pytest.raises(exceptions.StorageMigrationError, match='During initialisation of storage backend. Please check above traceback for cause.*'): + with pytest.raises(exceptions.StorageMigrationError, match=r'During initialisation of storage backend following excepion was raised: Monkey patchted error.*'): config.create_profile(profile_name, 'core.sqlite_temp', {})