PageRenderTime 41ms CodeModel.GetById 18ms RepoModel.GetById 0ms app.codeStats 0ms

/src/NUnit/core/NUnitException.cs

#
C# | 50 lines | 18 code | 7 blank | 25 comment | 0 complexity | 5df679047a0f4414da194cd689d521ae MD5 | raw file
Possible License(s): GPL-2.0
  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.
  5. // ****************************************************************
  6. namespace NUnit.Core
  7. {
  8. using System;
  9. using System.Runtime.Serialization;
  10. /// <summary>
  11. /// Thrown when an assertion failed. Here to preserve the inner
  12. /// exception and hence its stack trace.
  13. /// </summary>
  14. ///
  15. [Serializable]
  16. public class NUnitException : ApplicationException
  17. {
  18. public NUnitException () : base()
  19. {}
  20. /// <summary>
  21. /// Standard constructor
  22. /// </summary>
  23. /// <param name="message">The error message that explains
  24. /// the reason for the exception</param>
  25. public NUnitException(string message) : base (message)
  26. {}
  27. /// <summary>
  28. /// Standard constructor
  29. /// </summary>
  30. /// <param name="message">The error message that explains
  31. /// the reason for the exception</param>
  32. /// <param name="inner">The exception that caused the
  33. /// current exception</param>
  34. public NUnitException(string message, Exception inner) :
  35. base(message, inner)
  36. {}
  37. /// <summary>
  38. /// Serialization Constructor
  39. /// </summary>
  40. protected NUnitException(SerializationInfo info,
  41. StreamingContext context) : base(info,context){}
  42. }
  43. }