00001 /* ///////////////////////////////////////////////////////////////////////// 00002 * File: winstl/toolhelp/error/exceptions.hpp 00003 * 00004 * Purpose: Exception classes for TOOLHELP components. 00005 * 00006 * Created: 21st May 2005 00007 * Updated: 10th August 2009 00008 * 00009 * Thanks: To Pablo for contributing this great library. 00010 * 00011 * Home: http://stlsoft.org/ 00012 * 00013 * Copyright (c) 2005-2009, Pablo Aguilar 00014 * Copyright (c) 2006-2007, Matthew Wilson 00015 * All rights reserved. 00016 * 00017 * Redistribution and use in source and binary forms, with or without 00018 * modification, are permitted provided that the following conditions are met: 00019 * 00020 * - Redistributions of source code must retain the above copyright notice, this 00021 * list of conditions and the following disclaimer. 00022 * - Redistributions in binary form must reproduce the above copyright notice, 00023 * this list of conditions and the following disclaimer in the documentation 00024 * and/or other materials provided with the distribution. 00025 * - Neither the name(s) of Matthew Wilson and Synesis Software, nor Pablo 00026 * Aguilar, nor the names of any contributors may be used to endorse or 00027 * promote products derived from this software without specific prior written 00028 * permission. 00029 * 00030 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 00031 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00032 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 00033 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 00034 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 00035 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 00036 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 00037 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 00038 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 00039 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 00040 * POSSIBILITY OF SUCH DAMAGE. 00041 * 00042 * ////////////////////////////////////////////////////////////////////// */ 00043 00044 00051 #ifndef WINSTL_INCL_WINSTL_TOOLHELP_ERROR_HPP_SEQUENCE_EXCEPTION 00052 #define WINSTL_INCL_WINSTL_TOOLHELP_ERROR_HPP_SEQUENCE_EXCEPTION 00053 00054 #ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION 00055 # define WINSTL_VER_WINSTL_TOOLHELP_ERROR_HPP_SEQUENCE_EXCEPTION_MAJOR 2 00056 # define WINSTL_VER_WINSTL_TOOLHELP_ERROR_HPP_SEQUENCE_EXCEPTION_MINOR 0 00057 # define WINSTL_VER_WINSTL_TOOLHELP_ERROR_HPP_SEQUENCE_EXCEPTION_REVISION 2 00058 # define WINSTL_VER_WINSTL_TOOLHELP_ERROR_HPP_SEQUENCE_EXCEPTION_EDIT 13 00059 #endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */ 00060 00061 /* ///////////////////////////////////////////////////////////////////////// 00062 * Includes 00063 */ 00064 00065 #ifndef WINSTL_INCL_WINSTL_H_WINSTL 00066 # include <winstl/winstl.h> 00067 #endif /* !WINSTL_INCL_WINSTL_H_WINSTL */ 00068 #ifdef STLSOFT_CF_PRAGMA_ONCE_SUPPORT 00069 # pragma once 00070 #endif /* STLSOFT_CF_PRAGMA_ONCE_SUPPORT */ 00071 #ifndef WINSTL_INCL_WINSTL_ERROR_HPP_WINDOWS_EXCEPTIONS 00072 # include <winstl/error/exceptions.hpp> 00073 #endif /* !WINSTL_INCL_WINSTL_ERROR_HPP_WINDOWS_EXCEPTIONS */ 00074 00075 #ifndef STLSOFT_INCL_H_TLHELP32 00076 # define STLSOFT_INCL_H_TLHELP32 00077 # include <tlhelp32.h> 00078 #endif /* !STLSOFT_INCL_H_TLHELP32 */ 00079 00080 /* ///////////////////////////////////////////////////////////////////////// 00081 * Namespace 00082 */ 00083 00084 #ifndef _WINSTL_NO_NAMESPACE 00085 # if defined(_STLSOFT_NO_NAMESPACE) || \ 00086 defined(STLSOFT_DOCUMENTATION_SKIP_SECTION) 00087 /* There is no stlsoft namespace, so must define ::winstl */ 00088 namespace winstl 00089 { 00090 # else 00091 /* Define stlsoft::winstl_project */ 00092 00093 namespace stlsoft 00094 { 00095 00096 namespace winstl_project 00097 { 00098 00099 # endif /* _STLSOFT_NO_NAMESPACE */ 00100 #endif /* !_WINSTL_NO_NAMESPACE */ 00101 00102 /* ///////////////////////////////////////////////////////////////////////// 00103 * Classes 00104 */ 00105 00111 struct toolhelp_exception 00112 : public windows_exception 00113 { 00116 public: 00117 typedef windows_exception parent_class_type; 00118 typedef toolhelp_exception class_type; 00119 typedef parent_class_type::error_code_type error_code_type; 00121 00124 public: 00128 ss_explicit_k toolhelp_exception(error_code_type err) 00129 : parent_class_type(err) 00130 {} 00135 toolhelp_exception(char const* reason, error_code_type err) 00136 : parent_class_type(reason, err) 00137 {} 00139 }; 00140 00141 /* ////////////////////////////////////////////////////////////////////// */ 00142 00143 #ifndef _WINSTL_NO_NAMESPACE 00144 # if defined(_STLSOFT_NO_NAMESPACE) || \ 00145 defined(STLSOFT_DOCUMENTATION_SKIP_SECTION) 00146 } // namespace winstl 00147 # else 00148 } // namespace winstl_project 00149 } // namespace stlsoft 00150 # endif /* _STLSOFT_NO_NAMESPACE */ 00151 #endif /* !_WINSTL_NO_NAMESPACE */ 00152 00153 /* ////////////////////////////////////////////////////////////////////// */ 00154 00155 #endif // WINSTL_INCL_WINSTL_TOOLHELP_ERROR_HPP_SEQUENCE_EXCEPTION 00156 00157 /* ///////////////////////////// end of file //////////////////////////// */