1 // **************************************************************** 2 // This is free software licensed under the NUnit license. You 3 // may obtain a copy of the license as well as information regarding 4 // copyright ownership at http://nunit.org/?p=license&r=2.4. 5 // **************************************************************** 6 7 namespace NUnit.Framework 8 { 9 using System; 10 using System.Runtime.Serialization; 11 12 /// <summary> 13 /// Thrown when an assertion failed. 14 /// </summary> 15 /// 16 [Serializable] 17 public class AssertionException : System.Exception 18 { 19 /// <param name="message">The error message that explains 20 /// the reason for the exception</param> AssertionException(string message)21 public AssertionException (string message) : base(message) 22 {} 23 24 /// <param name="message">The error message that explains 25 /// the reason for the exception</param> 26 /// <param name="inner">The exception that caused the 27 /// current exception</param> AssertionException(string message, Exception inner)28 public AssertionException(string message, Exception inner) : 29 base(message, inner) 30 {} 31 32 /// <summary> 33 /// Serialization Constructor 34 /// </summary> AssertionException(SerializationInfo info, StreamingContext context)35 protected AssertionException(SerializationInfo info, 36 StreamingContext context) : base(info,context) 37 {} 38 39 } 40 } 41