namespace Observatory.Framework;
///
/// Container for exceptions within plugins which cannot be gracefully handled in context,
/// but benefit from having a context-specific user message.
///
public class PluginException : Exception
{
///
/// Initialze new PluginException with details of the originating plugin and a specific user-facing message for display.
///
///
///
///
public PluginException(string pluginName, string userMessage, Exception innerException) : base(innerException.Message, innerException)
{
PluginName = pluginName;
UserMessage = userMessage;
}
///
/// Name of plugin from which the exception was thrown.
///
public string PluginName { get; }
///
/// Message to be displayed to user.
///
public string UserMessage { get; }
}