using System;
using Microsoft.Xna.Framework.Content;
namespace StardewModdingAPI.Framework.Exceptions
{
/// An implementation of used by SMAPI to detect whether it was thrown by SMAPI or the underlying framework.
internal class SContentLoadException : ContentLoadException
{
/*********
** Accessors
*********/
/// Why loading the asset through the content pipeline failed.
public ContentLoadErrorType ErrorType { get; }
/*********
** Public methods
*********/
/// Construct an instance.
/// Why loading the asset through the content pipeline failed.
/// The error message.
/// The underlying exception, if any.
public SContentLoadException(ContentLoadErrorType errorType, string message, Exception? ex = null)
: base(message, ex)
{
this.ErrorType = errorType;
}
}
}