Skip to content

Commit 771db78

Browse files
Debug the failing culture values
1 parent 84704dc commit 771db78

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/ImageSharp.Web/Commands/Converters/SimpleCommandConverter{T}.cs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
using System;
55
using System.Globalization;
6+
using System.Text;
67

78
namespace SixLabors.ImageSharp.Web.Commands.Converters
89
{
@@ -42,7 +43,17 @@ public object ConvertFrom(
4243
}
4344
catch (Exception)
4445
{
45-
throw new Exception(value);
46+
StringBuilder sb = new StringBuilder();
47+
48+
sb.AppendLine(nameof(culture.Name));
49+
sb.AppendLine(culture.Name);
50+
sb.AppendLine(nameof(culture.NumberFormat.NumberDecimalSeparator));
51+
sb.AppendLine(culture.NumberFormat.NumberDecimalSeparator);
52+
sb.AppendLine(nameof(culture.TextInfo.ListSeparator));
53+
sb.AppendLine(culture.TextInfo.ListSeparator);
54+
sb.AppendLine("Value");
55+
sb.AppendLine(value);
56+
throw new Exception(sb.ToString());
4657
}
4758
}
4859
}

0 commit comments

Comments
 (0)