From aa01142d8793bbea326626b6696b4a586060f23f Mon Sep 17 00:00:00 2001 From: maliming Date: Thu, 18 Nov 2021 16:50:20 +0800 Subject: [PATCH] Update UnitOfWorkMongoDbContextProvider.cs --- .../Volo/Abp/Uow/MongoDB/UnitOfWorkMongoDbContextProvider.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/framework/src/Volo.Abp.MongoDB/Volo/Abp/Uow/MongoDB/UnitOfWorkMongoDbContextProvider.cs b/framework/src/Volo.Abp.MongoDB/Volo/Abp/Uow/MongoDB/UnitOfWorkMongoDbContextProvider.cs index 80314557e4..81bc9ac086 100644 --- a/framework/src/Volo.Abp.MongoDB/Volo/Abp/Uow/MongoDB/UnitOfWorkMongoDbContextProvider.cs +++ b/framework/src/Volo.Abp.MongoDB/Volo/Abp/Uow/MongoDB/UnitOfWorkMongoDbContextProvider.cs @@ -188,7 +188,7 @@ namespace Volo.Abp.Uow.MongoDB { session.StartTransaction(); } - catch (Exception e) + catch (NotSupportedException e) { Logger.LogError("The current MongoDB database does not support transactions, All operations will be performed in non-transactions, This may cause errors."); Logger.LogException(e); @@ -239,7 +239,7 @@ namespace Volo.Abp.Uow.MongoDB { session.StartTransaction(); } - catch (Exception e) + catch (NotSupportedException e) { Logger.LogError("The current MongoDB database does not support transactions, All operations will be performed in non-transactions, This may cause errors."); Logger.LogException(e);