Advertisement
Guest User

Untitled

a guest
Jul 27th, 2017
593
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.48 KB | None | 0 0
  1. /* ---------------------------------------------------------------------------
  2. ** Team Bear King
  3. ** ?2015 DigiPen Institute of Technology, All Rights Reserved.
  4. **
  5. ** DXErrorHandling.cpp
  6. **
  7. ** Author:
  8. ** - Matt Yan - m.yan@digipen.edu
  9. **
  10. ** Contributors:
  11. ** - <list in same format as author if applicable>
  12. ** -------------------------------------------------------------------------*/
  13.  
  14. #include "UrsinePrecompiled.h"
  15.  
  16. #include "DXErrorHandling.h"
  17.  
  18. #define hde(code) \
  19. case code:\
  20. return #code;
  21.  
  22. const char* ursine::graphics::DXCore::GetDXErrorMessage(int code)
  23. {
  24. //other I may have to think about
  25. /*
  26. DXGI_STATUS_OCCLUDED
  27. DXGI_STATUS_CLIPPED
  28. DXGI_STATUS_NO_REDIRECTION
  29. DXGI_STATUS_GRAPHICS_VIDPN_SOURCE_IN_USE
  30. DXGI_STATUS_MODE_CHANGED
  31. DXGI_STATUS_MODE_CHANGE_IN_PROGRESS
  32. DXGI_STATUS_UNOCCLUDED
  33. DXGI_STATUS_DDA_WAS_STILL_DRAWING
  34.  
  35.  
  36. */
  37.  
  38.  
  39. switch(code)
  40. {
  41. //directx error codes
  42. hde(DXGI_ERROR_MODE_CHANGE_IN_PROGRESS)
  43. hde(DXGI_STATUS_NO_DESKTOP_ACCESS);
  44. hde(DXGI_ERROR_DEVICE_HUNG);
  45. hde(DXGI_ERROR_DEVICE_REMOVED);
  46. hde(DXGI_ERROR_DEVICE_RESET);
  47. hde(DXGI_ERROR_DRIVER_INTERNAL_ERROR);
  48. hde(DXGI_ERROR_FRAME_STATISTICS_DISJOINT);
  49. hde(DXGI_ERROR_GRAPHICS_VIDPN_SOURCE_IN_USE);
  50. hde(DXGI_ERROR_INVALID_CALL);
  51. hde(DXGI_ERROR_MORE_DATA);
  52. hde(DXGI_ERROR_NONEXCLUSIVE);
  53. hde(DXGI_ERROR_NOT_CURRENTLY_AVAILABLE);
  54. hde(DXGI_ERROR_NOT_FOUND);
  55. hde(DXGI_ERROR_REMOTE_CLIENT_DISCONNECTED);
  56. hde(DXGI_ERROR_REMOTE_OUTOFMEMORY);
  57. hde(DXGI_ERROR_WAS_STILL_DRAWING);
  58. hde(DXGI_ERROR_UNSUPPORTED);
  59. hde(DXGI_ERROR_ACCESS_LOST);
  60. hde(DXGI_ERROR_WAIT_TIMEOUT);
  61. hde(DXGI_ERROR_SESSION_DISCONNECTED);
  62. hde(DXGI_ERROR_RESTRICT_TO_OUTPUT_STALE);
  63. hde(DXGI_ERROR_CANNOT_PROTECT_CONTENT);
  64. hde(DXGI_ERROR_ACCESS_DENIED);
  65. hde(DXGI_ERROR_NAME_ALREADY_EXISTS);
  66. hde(DXGI_ERROR_SDK_COMPONENT_MISSING);
  67. hde(DXGI_STATUS_OCCLUDED);
  68.  
  69. //other error codes
  70. hde(E_ABORT);
  71. hde(E_ACCESSDENIED);
  72. hde(E_FAIL);
  73. hde(E_HANDLE);
  74. hde(E_INVALIDARG);
  75. hde(E_NOINTERFACE);
  76. hde(E_NOTIMPL);
  77. hde(E_OUTOFMEMORY);
  78. hde(E_POINTER);
  79. hde(E_UNEXPECTED);
  80. hde(S_OK);
  81. default:
  82. return "UNKNOWN ERROR";
  83. }
  84. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement