ANT_Exception.cs 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*
  2. This software is subject to the license described in the License.txt file
  3. included with this software distribution. You may not use this file except in compliance
  4. with this license.
  5. Copyright (c) Dynastream Innovations Inc. 2013
  6. All rights reserved.
  7. */
  8. using System;
  9. using System.Collections.Generic;
  10. using System.Linq;
  11. using System.Text;
  12. namespace ANT_Managed_Library
  13. {
  14. /// <summary>
  15. /// An exception occuring in the ANT Managed Library
  16. /// </summary>
  17. [Serializable]
  18. public class ANT_Exception: Exception
  19. {
  20. /// <summary>
  21. /// Prefixes given string with "ANTLibrary Exception: "
  22. /// </summary>
  23. /// <param name="exceptionDetail">String to prefix</param>
  24. public ANT_Exception(String exceptionDetail) : base("ANTLibrary Exception: " + exceptionDetail) { }
  25. /// <summary>
  26. /// Prefixes given string with "ANTLibrary Exception: " and propates inner exception
  27. /// </summary>
  28. /// <param name="exceptionDetail">String to prefix</param>
  29. /// <param name="innerException">Inner exception</param>
  30. public ANT_Exception(String exceptionDetail, Exception innerException) : base("ANTLibrary Exception: " + exceptionDetail, innerException) { }
  31. /// <summary>
  32. /// Copy constructor
  33. /// </summary>
  34. /// <param name="aex">ANTException to copy</param>
  35. public ANT_Exception(ANT_Exception aex) : base(aex.Message) { } //C++ exceptions like to have a copy constructor
  36. }
  37. }