Handlers.h
Go to the documentation of this file.
1 #pragma once
2 
3 namespace AppSecInc
4 {
5  namespace Exceptions
6  {
7  void COM_EXCEPTION_HANDLER_BLOCK_impl(_com_error& e);
8  void STD_EXCEPTION_HANDLER_BLOCK_impl(std::exception& e);
10  const HRESULT default_error_code = E_FAIL;
11  }
12 }
13 
14 #define STD_EXCEPTION_HANDLER_BLOCK catch (std::exception& e) { AppSecInc::Exceptions::STD_EXCEPTION_HANDLER_BLOCK_impl(e); return AppSecInc::Exceptions::default_error_code; }
15 #define COM_EXCEPTION_HANDLER_BLOCK catch (_com_error& e) { AppSecInc::Exceptions::COM_EXCEPTION_HANDLER_BLOCK_impl(e); return e.Error(); }
16 #define ELLIPSIS_EXCEPTION_HANDLER_BLOCK catch (...) { AppSecInc::Exceptions::ELLIPSIS_EXCEPTION_HANDLER_BLOCK_impl(); return E_UNEXPECTED; }
17 
18 #define EXCEPTION_HANDLER_PROLOG try {
19 #define EXCEPTION_HANDLER_EPILOG } STD_EXCEPTION_HANDLER_BLOCK COM_EXCEPTION_HANDLER_BLOCK ELLIPSIS_EXCEPTION_HANDLER_BLOCK
void ELLIPSIS_EXCEPTION_HANDLER_BLOCK_impl()
Definition: Handlers.cpp:22
void COM_EXCEPTION_HANDLER_BLOCK_impl(_com_error &e)
Definition: Handlers.cpp:4
void STD_EXCEPTION_HANDLER_BLOCK_impl(std::exception &e)
Definition: Handlers.cpp:15
const HRESULT default_error_code
Definition: Handlers.h:10


© Application Security Inc. - All Rights Reserved http://msiext.codeplex.com