/// <summary> /// Traps the error messages from subsystems. /// </summary> /// <param name="sender">The sender.</param> /// <param name="args">The args.</param> private void TrapSubsystemError(object sender, SPSErrorArgs args) { if (_actionEditorError != null) { _actionEditorError.AddError(args); } }
public void ConstructorDevelopper() { ArgumentException ex = new ArgumentException("ArgumentExcptionMessage", "Test"); SPSErrorArgs args = new SPSErrorArgs("Subsystem", "User Message", ex, true); Assert.IsTrue(args.OnlyDevelopper); }
public void ConstructorBadParams() { ArgumentException ex = new ArgumentException("ArgumentExcptionMessage", "Test"); SPSErrorArgs args = new SPSErrorArgs(null, null, null); Assert.IsNull(args.InternalException); }
// (<[^>]+>) remove html tags. /// <summary> /// Traps the error messages from subsystems. /// </summary> /// <param name="args">The args.</param> private void SendError(SPSErrorArgs args) { if (OnError != null) { OnError(this, args); } DumpException(args.UserMessage, args.InternalException); }
/// <summary> /// Traps the error messages from subsystems. /// </summary> /// <param name="sender">The sender.</param> /// <param name="args">The args.</param> private void TrapSubsystemError(object sender, SPSErrorArgs args) { if (_actionEditorError != null) { _actionEditorError.AddError(args); } DumpException(args.InternalException.TargetSite.Name, args.InternalException); }
public void Use() { ArgumentException ex = new ArgumentException("ArgumentExcptionMessage", "Test"); SPSErrorArgs args = new SPSErrorArgs("Subsystem", "User Message", ex, true); Assert.IsTrue(args.OnlyDevelopper); Assert.IsTrue(args.InternalException.Equals(ex)); Assert.IsTrue(args.Subsystem.Equals("Subsystem")); Assert.IsTrue(args.UserMessage.Equals("User Message")); Assert.AreEqual(typeof(ArgumentException), args.InternalException.GetType()); }
/// <summary> /// Adds the error. /// </summary> /// <param name="reportedError">The reported error.</param> public void AddError(SPSErrorArgs reportedError) { _errors.Push(reportedError); }
/// <summary> /// Traps the error messages from subsystems. /// </summary> /// <param name="sender">The sender.</param> /// <param name="args">The args.</param> private void TrapSubsystemError(object sender, SPSErrorArgs args) { _actionGridError.AddError(args); }
/// <summary> /// Traps the error messages from subsystems. /// </summary> /// <param name="sender">The sender.</param> /// <param name="args">The args.</param> protected void TrapSubsystemError(object sender, SPSErrorArgs args) { _errorBox.AddError(args); }