diff options
| author | assiduous <assiduous@diligentgraphics.com> | 2020-01-08 08:11:05 +0000 |
|---|---|---|
| committer | assiduous <assiduous@diligentgraphics.com> | 2020-01-08 08:11:05 +0000 |
| commit | c55556104937ef5f16c3b8a8df9d940a8d257781 (patch) | |
| tree | 24f776d8b5723e00b2351eb8c22f51f3d012add4 /Graphics/GraphicsEngineVulkan | |
| parent | Fixed some clang warnings (diff) | |
| download | DiligentCore-c55556104937ef5f16c3b8a8df9d940a8d257781.tar.gz DiligentCore-c55556104937ef5f16c3b8a8df9d940a8d257781.zip | |
Updated factory functions to not throw exceptions, but return; fixed API version mismatch error message
Diffstat (limited to 'Graphics/GraphicsEngineVulkan')
| -rw-r--r-- | Graphics/GraphicsEngineVulkan/src/EngineFactoryVk.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Graphics/GraphicsEngineVulkan/src/EngineFactoryVk.cpp b/Graphics/GraphicsEngineVulkan/src/EngineFactoryVk.cpp index b1c91a7d..264eb168 100644 --- a/Graphics/GraphicsEngineVulkan/src/EngineFactoryVk.cpp +++ b/Graphics/GraphicsEngineVulkan/src/EngineFactoryVk.cpp @@ -98,7 +98,10 @@ void EngineFactoryVkImpl::CreateDeviceAndContextsVk(const EngineVkCreateInfo& _E SetDebugMessageCallback(_EngineCI.DebugMessageCallback); if (_EngineCI.APIVersion != DILIGENT_API_VERSION) - LOG_ERROR_AND_THROW("Diligent Engine runtime (", _EngineCI.APIVersion, ") is not compatible with the client API version (", DILIGENT_API_VERSION, ")"); + { + LOG_ERROR_MESSAGE("Diligent Engine runtime (", DILIGENT_API_VERSION, ") is not compatible with the client API version (", _EngineCI.APIVersion, ")"); + return; + } VERIFY(ppDevice && ppContexts, "Null pointer provided"); if (!ppDevice || !ppContexts) @@ -254,7 +257,10 @@ void EngineFactoryVkImpl::AttachToVulkanDevice(std::shared_ptr<VulkanUtilities:: SetDebugMessageCallback(EngineCI.DebugMessageCallback); if (EngineCI.APIVersion != DILIGENT_API_VERSION) - LOG_ERROR_AND_THROW("Diligent Engine runtime (", EngineCI.APIVersion, ") is not compatible with the client API version (", DILIGENT_API_VERSION, ")"); + { + LOG_ERROR_MESSAGE("Diligent Engine runtime (", DILIGENT_API_VERSION, ") is not compatible with the client API version (", EngineCI.APIVersion, ")"); + return; + } VERIFY(ppCommandQueues && ppDevice && ppContexts, "Null pointer provided"); if (!LogicalDevice || !ppCommandQueues || !ppDevice || !ppContexts) |
