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.

138 lines
5.3 KiB

  1. /* /////////////////////////////////////////////////////////////////////////
  2. * File: platformstl/error/exceptions.hpp
  3. *
  4. * Purpose: Platform header for the platform_exceptions components.
  5. *
  6. * Created: 20th March 2005
  7. * Updated: 10th August 2009
  8. *
  9. * Home: http://stlsoft.org/
  10. *
  11. * Copyright (c) 2005-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 met:
  16. *
  17. * - Redistributions of source code must retain the above copyright notice, this
  18. * list of conditions and the following disclaimer.
  19. * - Redistributions in binary form must reproduce the above copyright notice,
  20. * this list of conditions and the following disclaimer in the documentation
  21. * and/or other materials provided with the distribution.
  22. * - Neither the name(s) of Matthew Wilson and Synesis Software nor the names of
  23. * any contributors may be used to endorse or promote products derived from
  24. * this software without specific prior written permission.
  25. *
  26. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  27. * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  28. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  29. * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
  30. * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  31. * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  32. * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  33. * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  34. * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  35. * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  36. * POSSIBILITY OF SUCH DAMAGE.
  37. *
  38. * ////////////////////////////////////////////////////////////////////// */
  39. #ifndef PLATFORMSTL_INCL_PLATFORMSTL_ERROR_HPP_EXCEPTIONS
  40. #define PLATFORMSTL_INCL_PLATFORMSTL_ERROR_HPP_EXCEPTIONS
  41. /* File version */
  42. #ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
  43. # define PLATFORMSTL_VER_PLATFORMSTL_ERROR_HPP_EXCEPTIONS_MAJOR 2
  44. # define PLATFORMSTL_VER_PLATFORMSTL_ERROR_HPP_EXCEPTIONS_MINOR 2
  45. # define PLATFORMSTL_VER_PLATFORMSTL_ERROR_HPP_EXCEPTIONS_REVISION 1
  46. # define PLATFORMSTL_VER_PLATFORMSTL_ERROR_HPP_EXCEPTIONS_EDIT 19
  47. #endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
  48. /** \file platformstl/error/exceptions.hpp
  49. *
  50. * \brief [C++ only] Definition of the platformstl::platform_exception
  51. * class
  52. * (\ref group__library__error "Error" Library).
  53. */
  54. /* /////////////////////////////////////////////////////////////////////////
  55. * Includes
  56. */
  57. #ifndef PLATFORMSTL_INCL_PLATFORMSTL_HPP_PLATFORMSTL
  58. # include <platformstl/platformstl.hpp>
  59. #endif /* !PLATFORMSTL_INCL_PLATFORMSTL_HPP_PLATFORMSTL */
  60. #if defined(PLATFORMSTL_OS_IS_UNIX)
  61. # ifndef UNIXSTL_INCL_UNIXSTL_HPP_ERROR_UNIX_EXCEPTIONS
  62. # include <unixstl/error/exceptions.hpp>
  63. # endif /* !UNIXSTL_INCL_UNIXSTL_ERROR_HPP_UNIX_EXCEPTIONS */
  64. #elif defined(PLATFORMSTL_OS_IS_WINDOWS)
  65. # ifndef WINSTL_INCL_WINSTL_ERROR_HPP_WINDOWS_EXCEPTIONS
  66. # include <winstl/error/exceptions.hpp>
  67. # endif /* !WINSTL_INCL_WINSTL_ERROR_HPP_WINDOWS_EXCEPTIONS */
  68. #else /* ? operating system */
  69. # error Operating system not discriminated
  70. #endif /* operating system */
  71. /* /////////////////////////////////////////////////////////////////////////
  72. * Namespace
  73. */
  74. #if defined(_STLSOFT_NO_NAMESPACE) || \
  75. defined(STLSOFT_DOCUMENTATION_SKIP_SECTION)
  76. /* There is no stlsoft namespace, so must define ::platformstl */
  77. namespace platformstl
  78. {
  79. #else
  80. /* Define stlsoft::platformstl_project */
  81. namespace stlsoft
  82. {
  83. namespace platformstl_project
  84. {
  85. #endif /* _STLSOFT_NO_NAMESPACE */
  86. /* ////////////////////////////////////////////////////////////////////// */
  87. #if defined(PLATFORMSTL_OS_IS_UNIX)
  88. # ifdef _UNIXSTL_NO_NAMESPACE
  89. typedef ::unix_exception platform_exception;
  90. typedef ::unix_exception_policy platform_exception_policy;
  91. # else /* ? _UNIXSTL_NO_NAMESPACE */
  92. typedef ::unixstl::unix_exception platform_exception;
  93. typedef ::unixstl::unix_exception_policy platform_exception_policy;
  94. # endif /* _UNIXSTL_NO_NAMESPACE */
  95. #elif defined(PLATFORMSTL_OS_IS_WINDOWS)
  96. # ifdef _WINSTL_NO_NAMESPACE
  97. typedef ::windows_exception platform_exception;
  98. typedef ::windows_exception_policy platform_exception_policy;
  99. # else /* ? _WINSTL_NO_NAMESPACE */
  100. typedef ::winstl::windows_exception platform_exception;
  101. typedef ::winstl::windows_exception_policy platform_exception_policy;
  102. # endif /* _WINSTL_NO_NAMESPACE */
  103. #else /* ? operating system */
  104. # error Operating system not discriminated
  105. #endif /* operating system */
  106. /* ////////////////////////////////////////////////////////////////////// */
  107. #if defined(_STLSOFT_NO_NAMESPACE) || \
  108. defined(STLSOFT_DOCUMENTATION_SKIP_SECTION)
  109. } // namespace platformstl
  110. #else
  111. } // namespace platformstl_project
  112. } // namespace stlsoft
  113. #endif /* _STLSOFT_NO_NAMESPACE */
  114. /* ////////////////////////////////////////////////////////////////////// */
  115. #endif /* !PLATFORMSTL_INCL_PLATFORMSTL_ERROR_HPP_EXCEPTIONS */
  116. /* ///////////////////////////// end of file //////////////////////////// */