MarketAlly.AIPlugin.Extensions/MarketAlly.AIPlugin.Learning/Exceptions/LearningServiceException.cs

42 lines
1.3 KiB
C#
Executable File

using System;
namespace MarketAlly.AIPlugin.Learning.Exceptions
{
/// <summary>
/// Exception thrown by learning services when operations fail
/// </summary>
public class LearningServiceException : Exception
{
public string? CorrelationId { get; set; }
public string? OperationType { get; set; }
public Dictionary<string, object>? Context { get; set; }
public LearningServiceException() : base()
{
}
public LearningServiceException(string message) : base(message)
{
}
public LearningServiceException(string message, Exception innerException) : base(message, innerException)
{
}
public LearningServiceException(string message, string correlationId) : base(message)
{
CorrelationId = correlationId;
}
public LearningServiceException(string message, Exception innerException, string correlationId) : base(message, innerException)
{
CorrelationId = correlationId;
}
public LearningServiceException(string message, string operationType, Dictionary<string, object> context) : base(message)
{
OperationType = operationType;
Context = context;
}
}
}