12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- using System;
- namespace PaintDotNet.Measurement
- {
- /// <summary>
- /// 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.
- /// </summary>
- 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;
- }
- }
- }
|