You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

135 lines
4.4 KiB

  1. /* /////////////////////////////////////////////////////////////////////////
  2. * File: stlsoft/error/os_exception.hpp
  3. *
  4. * Purpose: Basic exception classes.
  5. *
  6. * Created: 19th January 2002
  7. * Updated: 10th August 2009
  8. *
  9. * Home: http://stlsoft.org/
  10. *
  11. * Copyright (c) 2002-2009, Matthew Wilson and Synesis Software
  12. * All rights reserved.
  13. *
  14. * Redistribution and use in source and binary forms, with or without
  15. * modification, are permitted provided that the following conditions are
  16. * met:
  17. *
  18. * - Redistributions of source code must retain the above copyright notice,
  19. * this list of conditions and the following disclaimer.
  20. * - Redistributions in binary form must reproduce the above copyright
  21. * notice, this list of conditions and the following disclaimer in the
  22. * documentation and/or other materials provided with the distribution.
  23. * - Neither the name(s) of Matthew Wilson and Synesis Software nor the
  24. * names of any contributors may be used to endorse or promote products
  25. * derived from this software without specific prior written permission.
  26. *
  27. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
  28. * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
  29. * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  30. * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
  31. * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
  32. * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  33. * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
  34. * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  35. * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  36. * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  37. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  38. *
  39. * ////////////////////////////////////////////////////////////////////// */
  40. /** \file stlsoft/error/os_exception.hpp
  41. *
  42. * \brief [C++ only] Definition of the stlsoft::os_exception exception
  43. * class
  44. * (\ref group__library__error "Error" Library).
  45. */
  46. #ifndef STLSOFT_INCL_STLSOFT_ERROR_HPP_OS_EXCEPTION
  47. #define STLSOFT_INCL_STLSOFT_ERROR_HPP_OS_EXCEPTION
  48. #ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
  49. # define STLSOFT_VER_STLSOFT_ERROR_HPP_OS_EXCEPTION_MAJOR 5
  50. # define STLSOFT_VER_STLSOFT_ERROR_HPP_OS_EXCEPTION_MINOR 0
  51. # define STLSOFT_VER_STLSOFT_ERROR_HPP_OS_EXCEPTION_REVISION 1
  52. # define STLSOFT_VER_STLSOFT_ERROR_HPP_OS_EXCEPTION_EDIT 50
  53. #endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
  54. /* /////////////////////////////////////////////////////////////////////////
  55. * Compatibility
  56. */
  57. /*
  58. [DocumentationStatus:Ready]
  59. */
  60. /* /////////////////////////////////////////////////////////////////////////
  61. * Includes
  62. */
  63. #ifndef STLSOFT_INCL_STLSOFT_H_STLSOFT
  64. # include <stlsoft/stlsoft.h>
  65. #endif /* !STLSOFT_INCL_STLSOFT_H_STLSOFT */
  66. #ifndef STLSOFT_INCL_STLSOFT_ERROR_HPP_PROJECT_EXCEPTION
  67. # include <stlsoft/error/project_exception.hpp>
  68. #endif /* !STLSOFT_INCL_STLSOFT_ERROR_HPP_PROJECT_EXCEPTION */
  69. /* /////////////////////////////////////////////////////////////////////////
  70. * Namespace
  71. */
  72. #ifndef _STLSOFT_NO_NAMESPACE
  73. namespace stlsoft
  74. {
  75. #endif /* _STLSOFT_NO_NAMESPACE */
  76. /* /////////////////////////////////////////////////////////////////////////
  77. * Classes
  78. */
  79. /** \brief Root exception class for sub-project platform-specific
  80. * exceptions.
  81. *
  82. * \ingroup group__library__error
  83. *
  84. */
  85. class os_exception
  86. : public project_exception
  87. {
  88. /// \name Types
  89. /// @{
  90. public:
  91. /// The type of the current instantiation
  92. typedef os_exception class_type;
  93. /// The parent type
  94. typedef project_exception parent_class_type;
  95. /// @}
  96. /// \name Construction
  97. /// @{
  98. public:
  99. /// Default constructor
  100. os_exception()
  101. {}
  102. /// @}
  103. /// \name Accessors
  104. /// @{
  105. public:
  106. /// Returns a human-readable string describing the exception condition
  107. virtual char const* what() const stlsoft_throw_0() = 0;
  108. /// @}
  109. };
  110. /* ////////////////////////////////////////////////////////////////////// */
  111. #ifndef _STLSOFT_NO_NAMESPACE
  112. } // namespace stlsoft
  113. #endif /* _STLSOFT_NO_NAMESPACE */
  114. /* ////////////////////////////////////////////////////////////////////// */
  115. #endif /* !STLSOFT_INCL_STLSOFT_ERROR_HPP_OS_EXCEPTION */
  116. /* ///////////////////////////// end of file //////////////////////////// */