diff --git a/Modules/Graphics/App/Include/Methane/Graphics/AppBase.h b/Modules/Graphics/App/Include/Methane/Graphics/AppBase.h index e16d587e7..4d0bb1cdf 100644 --- a/Modules/Graphics/App/Include/Methane/Graphics/AppBase.h +++ b/Modules/Graphics/App/Include/Methane/Graphics/AppBase.h @@ -120,7 +120,7 @@ class AppBase // NOSONAR RenderPattern& GetScreenRenderPattern() const { META_CHECK_ARG_NOT_NULL(m_screen_render_pattern_ptr); return *m_screen_render_pattern_ptr; } const Ptr& GetViewStatePtr() const noexcept { return m_view_state_ptr; } ViewState& GetViewState() { META_CHECK_ARG_NOT_NULL(m_view_state_ptr); return *m_view_state_ptr; } - FrameSize GetFrameSizeInDots() const noexcept { return m_context_ptr->GetSettings().frame_size / m_context_ptr->GetContentScalingFactor(); } + FrameSize GetFrameSizeInDots() const { return m_context_ptr->GetSettings().frame_size / m_context_ptr->GetContentScalingFactor(); } ImageLoader& GetImageLoader() noexcept { return m_image_loader; } Data::AnimationsPool& GetAnimations() noexcept { return m_animations; } const Ptr& GetDepthTexturePtr() const noexcept { return m_depth_texture_ptr; } diff --git a/Modules/Graphics/Core/Sources/Methane/Graphics/DirectX12/SamplerDX.cpp b/Modules/Graphics/Core/Sources/Methane/Graphics/DirectX12/SamplerDX.cpp index a190b9044..f15e49c10 100644 --- a/Modules/Graphics/Core/Sources/Methane/Graphics/DirectX12/SamplerDX.cpp +++ b/Modules/Graphics/Core/Sources/Methane/Graphics/DirectX12/SamplerDX.cpp @@ -180,7 +180,7 @@ static D3D12_TEXTURE_ADDRESS_MODE ConvertAddressModeToDX(Sampler::Address::Mode } } -static void SetColor(const Color4F& in_color, FLOAT* p_out_color) noexcept +static void SetColor(const Color4F& in_color, FLOAT* p_out_color) { META_FUNCTION_TASK(); for (Data::Size i = 0; i < Color4F::Size; ++i) diff --git a/Modules/Graphics/Core/Sources/Methane/Graphics/QueryBuffer.cpp b/Modules/Graphics/Core/Sources/Methane/Graphics/QueryBuffer.cpp index 5e6fde8a4..d43fd76f6 100644 --- a/Modules/Graphics/Core/Sources/Methane/Graphics/QueryBuffer.cpp +++ b/Modules/Graphics/Core/Sources/Methane/Graphics/QueryBuffer.cpp @@ -47,7 +47,16 @@ Query::Query(QueryBuffer& buffer, CommandListBase& command_list, Data::Index ind Query::~Query() { META_FUNCTION_TASK(); - m_buffer_ptr->ReleaseQuery(*this); + try + { + m_buffer_ptr->ReleaseQuery(*this); + } + catch(const std::exception& e) + { + META_UNUSED(e); + META_LOG("WARNING: Unexpected error during Query destruction: {}", e.what()); + assert(false); + } } void Query::Begin() diff --git a/Modules/Graphics/Core/Sources/Methane/Graphics/Vulkan/RenderContextVK.cpp b/Modules/Graphics/Core/Sources/Methane/Graphics/Vulkan/RenderContextVK.cpp index 519b4bdfc..ad4acfa23 100644 --- a/Modules/Graphics/Core/Sources/Methane/Graphics/Vulkan/RenderContextVK.cpp +++ b/Modules/Graphics/Core/Sources/Methane/Graphics/Vulkan/RenderContextVK.cpp @@ -63,7 +63,16 @@ RenderContextVK::RenderContextVK(const Platform::AppEnvironment& app_env, Device RenderContextVK::~RenderContextVK() { META_FUNCTION_TASK(); - RenderContextVK::Release(); + try + { + RenderContextVK::Release(); + } + catch(const std::exception& e) + { + META_UNUSED(e); + META_LOG("WARNING: Unexpected error during Query destruction: {}", e.what()); + assert(false); + } } void RenderContextVK::Release() diff --git a/Modules/UserInterface/Types/Include/Methane/UserInterface/Context.h b/Modules/UserInterface/Types/Include/Methane/UserInterface/Context.h index 6abb144ae..5a6f6aea6 100644 --- a/Modules/UserInterface/Types/Include/Methane/UserInterface/Context.h +++ b/Modules/UserInterface/Types/Include/Methane/UserInterface/Context.h @@ -61,7 +61,7 @@ class Context const FrameSize& GetFrameSize() const noexcept { return GetRenderContext().GetSettings().frame_size; } template - [[nodiscard]] UnitSize GetFrameSizeIn() const noexcept + [[nodiscard]] UnitSize GetFrameSizeIn() const { META_FUNCTION_TASK(); if constexpr (units == Units::Pixels) diff --git a/Modules/UserInterface/Typography/Sources/Methane/UserInterface/Font.cpp b/Modules/UserInterface/Typography/Sources/Methane/UserInterface/Font.cpp index 8600e6c83..9bbb5b70c 100644 --- a/Modules/UserInterface/Typography/Sources/Methane/UserInterface/Font.cpp +++ b/Modules/UserInterface/Typography/Sources/Methane/UserInterface/Font.cpp @@ -413,7 +413,16 @@ Font::Font(const Data::Provider& data_provider, const Settings& settings) Font::~Font() { META_FUNCTION_TASK(); - ClearAtlasTextures(); + try + { + ClearAtlasTextures(); + } + catch(const std::exception& e) + { + META_UNUSED(e); + META_LOG("WARNING: Unexpected error during Font destruction: {}", e.what()); + assert(false); + } } void Font::ResetChars(const std::string& utf8_characters)