Leaked source code of windows server 2003
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.

63 lines
1.3 KiB

  1. /*++
  2. Copyright (c) 1998 Microsoft Corporation
  3. Module Name:
  4. vs_seh.cxx
  5. Abstract:
  6. Exception handling support code
  7. Author:
  8. Stefan R. Steiner [SSteiner] 15-Apr-1998
  9. Revision History:
  10. ssteiner 09/10/98 - Removed the exception classes. Now only throwing
  11. HRESULTs.
  12. aoltean 02/02/2000 - moved into Vss project under the name from bsexcept.cxx
  13. into "vs_seh"
  14. --*/
  15. #include <windows.h>
  16. #include "vs_seh.hxx"
  17. #include "vs_trace.hxx"
  18. /*++
  19. Routine Description:
  20. The Structured Exception Handling translator function. Translates
  21. SEH exceptions to C++ Native exceptions. Generates a trace message.
  22. Arguments:
  23. ExceptionCode - SEH exception code.
  24. pEP - pointer to a more detailed explanation of why the exception
  25. was thrown.
  26. Return Value:
  27. None
  28. Throws:
  29. HRESULT - translated exception code from windows exception code to HRESULT.
  30. --*/
  31. void _cdecl BsSeHandler::SeHandler(
  32. unsigned int uiExceptionCode,
  33. struct _EXCEPTION_POINTERS *pEP
  34. )
  35. {
  36. BsDebugTraceAlways( 0, DEBUG_TRACE_CATCH_EXCEPTIONS,
  37. ( L"BsSeHandler::SeHandler: Caught SEH exception, code: 0x%08x", uiExceptionCode ) );
  38. BS_THROW( (HRESULT)uiExceptionCode );
  39. UNREFERENCED_PARAMETER( pEP );
  40. }