Update UnitOfWorkMongoDbContextProvider.cs

pull/10658/head
maliming 4 years ago
parent d9fc461167
commit aa01142d87
No known key found for this signature in database
GPG Key ID: 096224957E51C89E

@ -188,7 +188,7 @@ namespace Volo.Abp.Uow.MongoDB
{ {
session.StartTransaction(); 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.LogError("The current MongoDB database does not support transactions, All operations will be performed in non-transactions, This may cause errors.");
Logger.LogException(e); Logger.LogException(e);
@ -239,7 +239,7 @@ namespace Volo.Abp.Uow.MongoDB
{ {
session.StartTransaction(); 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.LogError("The current MongoDB database does not support transactions, All operations will be performed in non-transactions, This may cause errors.");
Logger.LogException(e); Logger.LogException(e);

Loading…
Cancel
Save