Skip to content

Commit d8707c9

Browse files
committed
Update
1 parent a9bb8f9 commit d8707c9

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

src/DotNet/Pdb/Portable/PortablePdbCustomDebugInfoWriter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ void WriteSourceLink(PdbSourceLinkCustomDebugInfo cdi) {
222222

223223
void WriteAsyncMethodSteppingInformation(PdbAsyncMethodCustomDebugInfo cdi) {
224224
if (!methodContext.HasBody) {
225-
helper.Error2("Method has no body, can't write custom debug info: {0.}", cdi.Kind);
225+
helper.Error2("Method has no body, can't write custom debug info: {0}.", cdi.Kind);
226226
return;
227227
}
228228

src/DotNet/Writer/IWriterError.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ static partial class Extensions {
3636
/// <param name="helper">The instance of <see cref="IWriterError"/></param>
3737
/// <param name="message">Error message</param>
3838
/// <param name="args">Optional message arguments</param>
39-
public static void Error2(this IWriterError helper, string message, params object[] args) {
39+
internal static void Error2(this IWriterError helper, string message, params object[] args) {
4040
if (helper is IWriterError2 helper2)
4141
helper2.Error(message, args);
4242
else

src/DotNet/Writer/MetadataErrorContext.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// dnlib: See LICENSE.txt for more info
2+
13
using System;
24
using System.Text;
35

@@ -19,6 +21,8 @@ public void Append(string errorLevel, ref string message, ref object[] args) {
1921
var newArgs = new object[args.Length + count];
2022
Array.Copy(args, 0, newArgs, 0, args.Length);
2123

24+
if (newMessage.Length != 0 && newMessage[newMessage.Length - 1] != '.')
25+
newMessage.Append('.');
2226
newMessage.AppendFormat(" {0} occurred after metadata event {{{1}}}", errorLevel, ctxArgIndex);
2327
newArgs[ctxArgIndex] = Event;
2428

@@ -29,7 +33,7 @@ public void Append(string errorLevel, ref string message, ref object[] args) {
2933
MethodDef => "method",
3034
EventDef => "event",
3135
PropertyDef => "property",
32-
_ => throw new InvalidOperationException()
36+
_ => "???"
3337
};
3438
newMessage.AppendFormat(" during writing {0} '{{{1}}}' (0x{{{2}:X8}})", sourceType, ctxArgIndex + 1, ctxArgIndex + 2);
3539
newArgs[ctxArgIndex + 1] = tokenSource;

src/DotNet/Writer/PreserveTokensMetadata.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -855,7 +855,7 @@ void FindMemberDefs() {
855855
foreach (var type in allTypeDefs) {
856856
if (type is null)
857857
continue;
858-
858+
859859
pos = 0;
860860
var fields = type.Fields;
861861
count = fields.Count;

0 commit comments

Comments
 (0)