using System; namespace PaintDotNet.Measurement { /// /// This class is treated differently than an Exception in that the Message property /// is used as a localized error string that will be displayed to the user. Also, /// exceptions of this type are treated as non-fatal, and it is assumed that any /// function being executed has not caused any changes. /// If null is given for localizedErrorText, a generic message may be provided to /// the user instead. /// public class HistoryFunctionNonFatalException : Exception { private string localizedErrorText; public string LocalizedErrorText { get { return this.localizedErrorText; } } private const string message = "Non-fatal exception encountered"; public HistoryFunctionNonFatalException() { this.localizedErrorText = null; } public HistoryFunctionNonFatalException(string localizedErrorText) : base(message) { this.localizedErrorText = localizedErrorText; } public HistoryFunctionNonFatalException(string localizedErrorText, Exception innerException) : base(message, innerException) { this.localizedErrorText = localizedErrorText; } } }