cmperr.h 905 B

1234567891011121314151617181920212223242526272829
  1. //-------------------------------------------------------------------------------------------------------
  2. // Copyright (C) Microsoft. All rights reserved.
  3. // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
  4. //-------------------------------------------------------------------------------------------------------
  5. #pragma once
  6. enum
  7. {
  8. #undef LSC_ERROR_MSG
  9. #define LSC_ERROR_MSG(err, name, str) name = MAKE_HR(err),
  10. #include "perrors.h"
  11. #undef LSC_ERROR_MSG
  12. MWUNUSED_ENUM
  13. };
  14. class ParseExceptionObject
  15. {
  16. public:
  17. ParseExceptionObject(HRESULT hr, LPCWSTR stringOneIn = _u(""), LPCWSTR stringTwoIn = _u(""));
  18. ~ParseExceptionObject();
  19. HRESULT GetError() { return m_hr; }
  20. LPCWSTR GetStringOne() { return stringOne; }
  21. LPCWSTR GetStringTwo() { return stringTwo; }
  22. private:
  23. HRESULT m_hr;
  24. BSTR stringOne;
  25. BSTR stringTwo;
  26. };