2
0
mirror of https://github.com/9ParsonsB/Pulsar.git synced 2025-07-01 08:23:42 -04:00

Expose core error logger to plugins and report custom criteria errors (#78)

* Expose core error logger to plugins and report custom criteria errors

Fixes #77

This adds an error logging method on the IObservatoryCore interface that writes the exception details to ObservatoryCore's central error log (found in `${Documents}/ObservatoryErrorLog.txt`). In addition, added a timestamp to each error log.

Also updates the Explorer to report Custom Criteria file load errors and execution errors to the log. Also updates HeraldNotifier to report CacheIndex.json parse failures to the error log as well.

* Expand debugging/error logging in Herald; cleanup empty mp3 files

Herald crashes if attempting to play 0-byte mp3s so if detected, delete, re-request (empty files can occur in some azure failure cases (ie. out of quota). Trap and log errors in other places in HeraldQueue to avoid hard crashes due to weird and wonderful unexpected stuff.
This commit is contained in:
F K
2022-05-03 17:32:31 -04:00
committed by GitHub
parent 7fe11b8094
commit ab365cd322
8 changed files with 114 additions and 43 deletions

View File

@ -174,6 +174,13 @@ namespace Observatory.Framework.Interfaces
/// </summary>
public string Version { get; }
/// <summary>
/// Returns a delegate for logging an error for the calling plugin. A plugin can wrap this method
/// or pass it along to its collaborators.
/// </summary>
/// <param name="plugin">The calling plugin</param>
public Action<Exception, String> GetPluginErrorLogger (IObservatoryPlugin plugin);
/// <summary>
/// Perform an action on the current Avalonia UI thread.
/// </summary>