8000 Drop uninteresting information from Exception messages · apfunk/libgit2sharp@35e6cbe · GitHub
[go: up one dir, main page]

Skip to content

Commit 35e6cbe

Browse files
author
Edward Thomson
committed
Drop uninteresting information from Exception messages
1 parent 3091772 commit 35e6cbe

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

LibGit2Sharp/LibGit2SharpException.cs

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -47,20 +47,11 @@ protected LibGit2SharpException(SerializationInfo info, StreamingContext context
4747
{
4848
}
4949

50-
internal LibGit2SharpException(string message, GitErrorCode code, GitErrorCategory category) : this(FormatMessage(message, code, category))
50+
internal LibGit2SharpException(string message, GitErrorCode code, GitErrorCategory category) : this(message)
5151
{
5252
Data.Add("libgit2.code", (int)code);
5353
Data.Add("libgit2.category", (int)category);
5454

5555
}
56-
57-
private static string FormatMessage(string message, GitErrorCode code, GitErrorCategory category)
58-
{
59-
return String.Format(CultureInfo.InvariantCulture, "An error was raised by libgit2. Category = {0} ({1}).{2}{3}",
60-
category,
61-
code,
62-
Environment.NewLine,
63-
message);
64-
}
6556
}
6657
}

0 commit comments

Comments
 (0)
0