From 468cf73af2d557ff68bed7ae38c09daf4ef38043 Mon Sep 17 00:00:00 2001 From: Dylan Lerch Date: Wed, 22 Sep 2021 15:17:49 +1000 Subject: [PATCH] Set the native libgit2 error message when an exception is thrown in the subtransport --- LibGit2Sharp/SmartSubtransportStream.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/LibGit2Sharp/SmartSubtransportStream.cs b/LibGit2Sharp/SmartSubtransportStream.cs index 008d1fcd0..247e90f34 100644 --- a/LibGit2Sharp/SmartSubtransportStream.cs +++ b/LibGit2Sharp/SmartSubtransportStream.cs @@ -119,6 +119,10 @@ private static int SetError(SmartSubtransportStream stream, Exception caught) { errorCode = ((NativeException)ret).ErrorCode; } + else + { + Proxy.git_error_set_str(GitErrorCategory.Unknown, caught); + } return (int)errorCode; }