Skip to content

Commit

Permalink
Merge pull request #468 from dremin/catch-resource-errors
Browse files Browse the repository at this point in the history
Log errors loading resources instead of crashing
  • Loading branch information
dremin authored Nov 18, 2022
2 parents aacc9a5 + 891dd9f commit 0d0f2a1
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions RetroBar/Utilities/DictionaryManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,17 @@ private void SetDictionary(string dictionary, string dictFolder, string dictDefa
}
}

GetMergedDictionaries().Add(new ResourceDictionary()
try
{
Source = new Uri(dictFilePath, UriKind.RelativeOrAbsolute)
});
GetMergedDictionaries().Add(new ResourceDictionary()
{
Source = new Uri(dictFilePath, UriKind.RelativeOrAbsolute)
});
}
catch (Exception e)
{
ManagedShell.Common.Logging.ShellLogger.Error($"Error loading dictionaries: {e.Message} {e.InnerException?.Message}");
}
}

public List<string> GetThemes()
Expand Down

0 comments on commit 0d0f2a1

Please sign in to comment.