ReactOS 0.4.16-dev-1946-g52006dd
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#define STATUS_ILLEGAL_INSTRUCTION ((DWORD)0xC000001D)
10#endif
11#endif
12
13namespace ATL
14{
15
16
17//FIXME: Enable when RaiseException is marked as NORETURN
18//DECLSPEC_NORETURN
20{
21#ifdef ATLTRACE
22 ATLTRACE(hr);
23#endif
24
25#ifdef _ATL_NO_EXCEPTIONS
26
27 ATLASSERT(false);
28
32 );
33
34#else
35
36 // FIXME: This is horribly wrong, we should implement CException!
37 throw;
38
39#endif
40
41}
42
43
44#ifndef AtlThrow
45#define AtlThrow(x) AtlThrowImp(x)
46#endif
47
48
49}; // namespace ATL
50
51#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
#define EXCEPTION_ILLEGAL_INSTRUCTION
Definition: minwinbase.h:60
Definition: rosdlgs.h:6
void AtlThrowImp(HRESULT hr)
Definition: atlexcept.h:19
HRESULT hr
Definition: shlfolder.c:183
#define EXCEPTION_NONCONTINUABLE
Definition: stubs.h:23