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.

69 lines
1.3 KiB

  1. //+--------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1992.
  5. //
  6. // File: dfexcept.hxx
  7. //
  8. // Contents: Macros to make exception code no-ops in 16-bit
  9. // Includes real exceptions for 32-bit
  10. //
  11. // History: 08-Apr-92 DrewB Created
  12. // 10-Jul-92 DrewB Added 32-bit support
  13. //
  14. //---------------------------------------------------------------
  15. #ifndef __DFEXCEPT_HXX__
  16. #define __DFEXCEPT_HXX__
  17. #ifndef REF
  18. #ifdef _CAIRO_
  19. #include <except.hxx>
  20. #endif
  21. struct Exception
  22. {
  23. SCODE GetErrorCode(void) { return 0; }
  24. };
  25. #undef TRY
  26. #define TRY
  27. #undef CATCH
  28. #define CATCH(c, e) if (0) { Exception e;
  29. #undef AND_CATCH
  30. #define AND_CATCH(c, e) } else if (0) { Exception e;
  31. #undef END_CATCH
  32. #define END_CATCH }
  33. #undef RETHROW
  34. #define RETHROW(x)
  35. #ifdef WIN32
  36. #define THROW_SC(sc) \
  37. RaiseException((DWORD)(sc), EXCEPTION_NONCONTINUABLE, 0, NULL)
  38. #endif
  39. #else // REF
  40. struct Exception
  41. {
  42. SCODE GetErrorCode(void) { return 0; }
  43. };
  44. #undef TRY
  45. #define TRY
  46. #undef CATCH
  47. #define CATCH(c, e) if (0) { Exception e;
  48. #undef AND_CATCH
  49. #define AND_CATCH(c, e) } else if (0) { Exception e;
  50. #undef END_CATCH
  51. #define END_CATCH }
  52. #undef RETHROW
  53. #define RETHROW(x)
  54. #endif //!REF
  55. #endif // ifndef __DFEXCEPT_HXX__