From fef3fe41960a564aee1c02509cf73d8961adf3bd Mon Sep 17 00:00:00 2001 From: assiduous Date: Fri, 24 Jan 2020 15:05:34 -0800 Subject: Updated handling of fatal errors --- Graphics/GraphicsEngineOpenGL/include/pch.h | 30 ++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'Graphics/GraphicsEngineOpenGL') diff --git a/Graphics/GraphicsEngineOpenGL/include/pch.h b/Graphics/GraphicsEngineOpenGL/include/pch.h index bea72ba0..706fa9a7 100644 --- a/Graphics/GraphicsEngineOpenGL/include/pch.h +++ b/Graphics/GraphicsEngineOpenGL/include/pch.h @@ -122,23 +122,23 @@ #include "RenderDevice.h" #include "BaseInterfacesGL.h" -#define CHECK_GL_ERROR(...) \ - do \ - { \ - auto err = glGetError(); \ - if (err != GL_NO_ERROR) \ - { \ - LogError(__FUNCTION__, __FILE__, __LINE__, __VA_ARGS__, "\nGL Error Code: ", err); \ - UNEXPECTED("Error"); \ - } \ +#define CHECK_GL_ERROR(...) \ + do \ + { \ + auto err = glGetError(); \ + if (err != GL_NO_ERROR) \ + { \ + LogError(/*IsFatal=*/false, __FUNCTION__, __FILE__, __LINE__, __VA_ARGS__, "\nGL Error Code: ", err); \ + UNEXPECTED("Error"); \ + } \ } while (false) -#define CHECK_GL_ERROR_AND_THROW(...) \ - do \ - { \ - auto err = glGetError(); \ - if (err != GL_NO_ERROR) \ - LogError(__FUNCTION__, __FILE__, __LINE__, __VA_ARGS__, "\nGL Error Code: ", err); \ +#define CHECK_GL_ERROR_AND_THROW(...) \ + do \ + { \ + auto err = glGetError(); \ + if (err != GL_NO_ERROR) \ + LogError(/*IsFatal=*/false, __FUNCTION__, __FILE__, __LINE__, __VA_ARGS__, "\nGL Error Code: ", err); \ } while (false) #ifdef DEVELOPMENT -- cgit v1.2.3