Skip to content

Commit

Permalink
Improve error on connection, #59. Update driver 2.12.3.
Browse files Browse the repository at this point in the history
  • Loading branch information
nightroman committed May 29, 2021
1 parent 117e27c commit 5895f30
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .build.ps1
Expand Up @@ -244,7 +244,7 @@ task pushPSGallery package, version, {
$NuGetApiKey = Read-Host NuGetApiKey
Publish-Module -Path z/tools/$ModuleName -NuGetApiKey $NuGetApiKey
},
Clean
clean

# Synopsis: Copy external scripts to the project.
task updateScript @{
Expand Down
2 changes: 1 addition & 1 deletion Module/en-US/Mdbc.dll-Help.ps1
Expand Up @@ -567,7 +567,7 @@ Tells to return new documents on Replace and Update.
By default old documents are returned if they exist.
'@
Add = @'
Tells to add new documents on Replace and Update if old documents do not exist.
With Set or Update, tells to add a new document if the specified does not exist.
'@
Project = @'
Specifies the projection expression, i.e. fields to be retrieved.
Expand Down
6 changes: 6 additions & 0 deletions Release-Notes.md
@@ -1,6 +1,12 @@
# Mdbc Release Notes
[C# driver releases]: https://github.com/mongodb/mongo-csharp-driver/releases

## v6.5.10

C# driver 2.12.3

Improve error on connection, #59.

## v6.5.9

C# driver 2.12.1
Expand Down
12 changes: 11 additions & 1 deletion Src/Commands/AbstractSessionCommand.cs
Expand Up @@ -29,7 +29,17 @@ public abstract class AbstractSessionCommand : Abstract, IDisposable
static MethodInfo _StartImplicitSession = typeof(MongoClient).GetMethod("StartImplicitSession", BindingFlags.NonPublic | BindingFlags.Instance, null, new Type[] { typeof(CancellationToken) }, null);
IClientSessionHandle StartImplicitSession()
{
return (IClientSessionHandle)_StartImplicitSession.Invoke(MyClient, new object[] { default(CancellationToken) });
try
{
return (IClientSessionHandle)_StartImplicitSession.Invoke(MyClient, new object[] { default(CancellationToken) });
}
catch (TargetInvocationException ex)
{
if (ex.InnerException == null)
throw;
else
throw ex.InnerException;
}
}

[Parameter]
Expand Down
6 changes: 3 additions & 3 deletions Src/Mdbc.csproj
Expand Up @@ -16,9 +16,9 @@
<PackageReference Include="PowerShellStandard.Library" Version="5.1.0" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="MongoDB.Bson" Version="2.12.1" />
<PackageReference Include="MongoDB.Driver" Version="2.12.1" />
<PackageReference Include="MongoDB.Driver.Core" Version="2.12.1" />
<PackageReference Include="MongoDB.Bson" Version="2.12.3" />
<PackageReference Include="MongoDB.Driver" Version="2.12.3" />
<PackageReference Include="MongoDB.Driver.Core" Version="2.12.3" />
</ItemGroup>
<PropertyGroup>
<RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
Expand Down

0 comments on commit 5895f30

Please sign in to comment.