Example #1
0
 /// <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);
     }
 }
Example #2
0
        public void ConstructorDevelopper()
        {
            ArgumentException ex   = new ArgumentException("ArgumentExcptionMessage", "Test");
            SPSErrorArgs      args = new SPSErrorArgs("Subsystem", "User Message", ex, true);

            Assert.IsTrue(args.OnlyDevelopper);
        }
Example #3
0
        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);
        }
Example #5
0
 /// <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);
 }
Example #6
0
        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);
 }
Example #9
0
 /// <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);
 }