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);