2
0
mirror of https://github.com/9ParsonsB/Pulsar.git synced 2025-07-01 16:33:43 -04:00

Initial Commit

This commit is contained in:
2024-04-13 15:54:59 +10:00
parent 8e178cbb7b
commit 63ed43f4af
459 changed files with 8039 additions and 20504 deletions

View File

@ -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; }
}
}
}