Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 70ce1df

Browse files
dr1rrbnickrandolph
authored andcommitted
fix(hr): Do not report error if known to not be problematic
1 parent f66e9d1 commit 70ce1df

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

src/Uno.UI.RemoteControl/HotReload/ClientHotReloadProcessor.Common.Status.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,12 @@ internal void ReportError(Exception error)
308308
_onUpdated();
309309
}
310310

311+
internal void ReportWarning(Exception exception)
312+
{
313+
// This is a warning that does not prevent the HR to complete.
314+
// For now, we don't even surface it to the user in any way other than logs (by caller).
315+
}
316+
311317
internal void ReportCompleted()
312318
{
313319
var result = (_exceptions, IgnoreReason) switch

src/Uno.UI.RemoteControl/HotReload/ClientHotReloadProcessor.MetadataUpdate.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -529,6 +529,14 @@ private static void UpdateApplicationCore(Type[] types)
529529
_log.Warn($"Found invalid MetadataUpdateOriginalTypeAttribute for {type}");
530530
}
531531
}
532+
catch (TypeLoadException error)
533+
{
534+
if (_log.IsEnabled(LogLevel.Warning))
535+
{
536+
_log.Warn($"Type load error while processing MetadataUpdateOriginalTypeAttribute for {type}", error);
537+
}
538+
hr?.ReportWarning(error);
539+
}
532540
catch (Exception error)
533541
{
534542
if (_log.IsEnabled(LogLevel.Error))

0 commit comments

Comments
 (0)