Browse Source

Change exception handling in TimeZoneHelper

Catch general exceptions in TimeZoneHelper to handle unexpected errors.
pull/24607/head
Ma Liming 4 weeks ago
committed by GitHub
parent
commit
f70b6f1f82
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      framework/src/Volo.Abp.Timing/Volo/Abp/Timing/TimeZoneHelper.cs

2
framework/src/Volo.Abp.Timing/Volo/Abp/Timing/TimeZoneHelper.cs

@ -31,7 +31,7 @@ public static class TimeZoneHelper
var name = $"{timeZone.Name} ({GetTimezoneOffset(timeZoneInfo)})";
return new NameValue(name, timeZone.Name);
}
catch (TimeZoneNotFoundException)
catch (Exception)
{
// Invalid or unknown timezone IDs are expected here (e.g. from user input or
// external sources). We intentionally swallow this exception and return null

Loading…
Cancel
Save