You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
DateTime.ParseExact - message text in FormatException does not include string argument #94837
All SetBadDateTimeFailure() from DateTimeParse.ParseByFormat() and .DoStrictParse() seemingly don't set the message argument. I will propose to put extra failure handling code in DateTimeParse.TryParseExact(), such as:
Activity
karakasa commentedon Nov 16, 2023
The exact bug occurs here:
https://github.com/dotnet/runtime/blob/fe3abf5a6018226901054fb4bc2bc2aaf0fda462/src/libraries/System.Private.CoreLib/src/System/Globalization/DateTimeParse.cs#L4450C36-L4450C36
All
SetBadDateTimeFailure()fromDateTimeParse.ParseByFormat()and.DoStrictParse()seemingly don't set the message argument. I will propose to put extra failure handling code inDateTimeParse.TryParseExact(), such as:Similar issues occur in
DateTimeParse.TryParseas well.tarekgh commentedon Nov 16, 2023
This is fixed in the .NET 9.0 through #91303.
CC @stephentoub