MCPcopy Create free account
hub / github.com/carbonengine/trinity / GetCategory

Method GetCategory

trinityal/ALResult.cpp:96–132  ·  view source on GitHub ↗

-------------------------------------------------------------------------------------- Description: Returns ALResult error category. Return value: ALResult error category --------------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

94// ALResult error category
95// --------------------------------------------------------------------------------------
96Be::Result<HRESULT>::Category Be::Result<HRESULT>::GetCategory() const
97{
98 switch( GetResult() )
99 {
100 case E_OUTOFMEMORY:
101#if TRINITY_PLATFORM == TRINITY_DIRECTX11
102 case DXGI_ERROR_REMOTE_OUTOFMEMORY:
103#endif
104 return ALResult::OUT_OF_MEMORY;
105
106 case E_DEVICELOST:
107#if TRINITY_PLATFORM == TRINITY_DIRECTX11
108 case DXGI_ERROR_DEVICE_HUNG:
109 case DXGI_ERROR_DEVICE_REMOVED:
110 case DXGI_ERROR_DEVICE_RESET:
111 case DXGI_ERROR_DRIVER_INTERNAL_ERROR:
112#endif
113 return ALResult::DEVICE_LOST;
114
115 case E_INVALIDARG:
116 case E_INVALIDCALL:
117#if TRINITY_PLATFORM == TRINITY_DIRECTX11
118 case DXGI_ERROR_INVALID_CALL:
119#endif
120 return ALResult::INVALID_CALL;
121
122 default:
123 if( SUCCEEDED( m_result ) )
124 {
125 return ALResult::SUCCESS;
126 }
127 else
128 {
129 return ALResult::OTHER;
130 }
131 }
132}

Callers 2

ALResultBlue.cppFile · 0.80
TESTFunction · 0.80

Calls

no outgoing calls

Tested by 1

TESTFunction · 0.64