ReactOS 0.4.16-dev-334-g4d9f67c
atlexcept.h
Go to the documentation of this file.
1
2#ifndef __ATLEXCEPT_H__
3#define __ATLEXCEPT_H__
4
5
6#ifdef _ATL_NO_EXCEPTIONS
7#if !defined(STATUS_NO_MEMORY) && defined(WIN32_NO_STATUS)
8#define STATUS_NO_MEMORY ((DWORD)0xC0000017)
9#endif
10#endif
11
12namespace ATL
13{
14
15
16//FIXME: Enable when RaiseException is marked as NORETURN
17//DECLSPEC_NORETURN
19{
20#ifdef ATLTRACE
21 ATLTRACE(hr);
22#endif
23
24#ifdef _ATL_NO_EXCEPTIONS
25
26 ATLASSERT(false);
27
31 );
32
33#else
34
35 // FIXME: This is horribly wrong, we should implement CException!
36 throw;
37
38#endif
39
40}
41
42
43#ifndef AtlThrow
44#define AtlThrow(x) AtlThrowImp(x)
45#endif
46
47
48}; // namespace ATL
49
50#endif
#define ATLASSERT(x)
Definition: CComVariant.cpp:10
#define ATLTRACE(format,...)
Definition: atltrace.h:269
#define STATUS_NO_MEMORY
Definition: d3dkmdt.h:51
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define NULL
Definition: types.h:112
VOID WINAPI RaiseException(_In_ DWORD dwExceptionCode, _In_ DWORD dwExceptionFlags, _In_ DWORD nNumberOfArguments, _In_opt_ const ULONG_PTR *lpArguments)
Definition: except.c:700
Definition: rosdlgs.h:6
void AtlThrowImp(HRESULT hr)
Definition: atlexcept.h:18
HRESULT hr
Definition: shlfolder.c:183
#define EXCEPTION_NONCONTINUABLE
Definition: stubs.h:23
#define EXCEPTION_ILLEGAL_INSTRUCTION
Definition: winbase.h:353