mirror of
https://github.com/9ParsonsB/Pulsar.git
synced 2025-07-01 16:33:43 -04:00
observatory herald (#30)
* WIP: initial commit for observatory herald * Plugin error handling refactor * make error window non-modal * tidy up plugin error handling * first pass for basic herald functionality * corrections for linux env * Use FNV hash directly instead of managing through dictionary/index file * resolve audio queuing issue, switch to personal NetCoreAudio fork * merge cleanup * add enable setting, populate defaults * framework xml doc update * Adjust settings, add style selection, replace locale with demonym in dropdown list. * Test is position is on screen before saving/loading. * use a default that's actually in the list
This commit is contained in:
34
ObservatoryFramework/Exceptions.cs
Normal file
34
ObservatoryFramework/Exceptions.cs
Normal file
@ -0,0 +1,34 @@
|
||||
using System;
|
||||
|
||||
namespace Observatory.Framework
|
||||
{
|
||||
/// <summary>
|
||||
/// Container for exceptions within plugins which cannot be gracefully handled in context,
|
||||
/// but benefit from having a context-specific user message.
|
||||
/// </summary>
|
||||
public class PluginException : Exception
|
||||
{
|
||||
/// <summary>
|
||||
/// Initialze new PluginException with details of the originating plugin and a specific user-facing message for display.
|
||||
/// </summary>
|
||||
/// <param name="pluginName"></param>
|
||||
/// <param name="userMessage"></param>
|
||||
/// <param name="innerException"></param>
|
||||
public PluginException(string pluginName, string userMessage, Exception innerException) : base(innerException.Message, innerException)
|
||||
{
|
||||
PluginName = pluginName;
|
||||
UserMessage = userMessage;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Name of plugin from which the exception was thrown.
|
||||
/// </summary>
|
||||
public string PluginName { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Message to be displayed to user.
|
||||
/// </summary>
|
||||
public string UserMessage { get; }
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user