From ceafc91561e969ead43a384648d54a6aa01c3912 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 26 Nov 2020 16:07:36 +0100 Subject: Document PUGL_CHECK_CONSTRUCTION --- bindings/cxx/include/pugl/pugl.hpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'bindings/cxx/include/pugl/pugl.hpp') diff --git a/bindings/cxx/include/pugl/pugl.hpp b/bindings/cxx/include/pugl/pugl.hpp index 83aa4a0..a16b67f 100644 --- a/bindings/cxx/include/pugl/pugl.hpp +++ b/bindings/cxx/include/pugl/pugl.hpp @@ -261,6 +261,17 @@ private: #elif defined(PUGL_HPP_ASSERT_CONSTRUCTION) # define PUGL_CHECK_CONSTRUCTION(cond, msg) assert(cond); #else +/** + Configurable macro for handling construction failure. + + If `PUGL_HPP_THROW_FAILED_CONSTRUCTION` is defined, then this throws a + `pugl::FailedConstructionError` if construction fails. + + If `PUGL_HPP_ASSERT_CONSTRUCTION` is defined, then this asserts if + construction fails. + + Otherwise, this does nothing. +*/ # define PUGL_CHECK_CONSTRUCTION(cond, msg) #endif -- cgit v1.2.1