mirror of
https://github.com/9ParsonsB/Pulsar.git
synced 2025-07-01 16:33:43 -04:00
Initial Commit
This commit is contained in:
@ -1,34 +1,31 @@
|
||||
using System;
|
||||
namespace Observatory.Framework;
|
||||
|
||||
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>
|
||||
/// Container for exceptions within plugins which cannot be gracefully handled in context,
|
||||
/// but benefit from having a context-specific user message.
|
||||
/// Initialze new PluginException with details of the originating plugin and a specific user-facing message for display.
|
||||
/// </summary>
|
||||
public class PluginException : Exception
|
||||
/// <param name="pluginName"></param>
|
||||
/// <param name="userMessage"></param>
|
||||
/// <param name="innerException"></param>
|
||||
public PluginException(string pluginName, string userMessage, Exception innerException) : base(innerException.Message, innerException)
|
||||
{
|
||||
/// <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>
|
||||
/// 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; }
|
||||
/// <summary>
|
||||
/// Message to be displayed to user.
|
||||
/// </summary>
|
||||
public string UserMessage { get; }
|
||||
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user