diff options
Diffstat (limited to 'src/SMAPI/Framework/Exceptions/SContentLoadException.cs')
-rw-r--r-- | src/SMAPI/Framework/Exceptions/SContentLoadException.cs | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/SMAPI/Framework/Exceptions/SContentLoadException.cs b/src/SMAPI/Framework/Exceptions/SContentLoadException.cs index be1fe748..4db24d06 100644 --- a/src/SMAPI/Framework/Exceptions/SContentLoadException.cs +++ b/src/SMAPI/Framework/Exceptions/SContentLoadException.cs @@ -7,12 +7,23 @@ namespace StardewModdingAPI.Framework.Exceptions internal class SContentLoadException : ContentLoadException { /********* + ** Accessors + *********/ + /// <summary>Why loading the asset through the content pipeline failed.</summary> + public ContentLoadErrorType ErrorType { get; } + + + /********* ** Public methods *********/ /// <summary>Construct an instance.</summary> + /// <param name="errorType">Why loading the asset through the content pipeline failed.</param> /// <param name="message">The error message.</param> /// <param name="ex">The underlying exception, if any.</param> - public SContentLoadException(string message, Exception? ex = null) - : base(message, ex) { } + public SContentLoadException(ContentLoadErrorType errorType, string message, Exception? ex = null) + : base(message, ex) + { + this.ErrorType = errorType; + } } } |