@@ -3722,7 +3722,7 @@ class LuaException : public std::exception
37223722 return m_what.c_str ();
37233723 }
37243724
3725- static void raise (lua_State* L, std::error_code code)
3725+ [[noreturn]] static void raise (lua_State* L, std::error_code code)
37263726 {
37273727 LUABRIDGE_ASSERT (areExceptionsEnabled (L));
37283728
@@ -8613,7 +8613,6 @@ inline int newindex_metamethod(lua_State* L)
86138613
86148614 lua_pop (L, 1 );
86158615 raise_lua_error (L, " no writable member '%s'" , key);
8616- return 0 ;
86178616}
86188617
86198618template <bool IsObject>
@@ -8703,7 +8702,6 @@ inline int newindex_metamethod_simple(lua_State* L)
87038702 }
87048703
87058704 raise_lua_error (L, " no writable member '%s'" , key);
8706- return 0 ;
87078705}
87088706
87098707[[noreturn]] inline int read_only_error (lua_State* L)
@@ -12967,7 +12965,9 @@ class Namespace : public detail::Registrar
1296712965 lua_pop (L, 4 );
1296812966
1296912967 throw_or_assert<std::logic_error>(" Base class is not registered" );
12968+ #if !LUABRIDGE_HAS_EXCEPTIONS
1297012969 return ;
12970+ #endif
1297112971 }
1297212972
1297312973 lua_rawgetp_x (L, -1 , detail::getClassKey ());
@@ -12976,7 +12976,9 @@ class Namespace : public detail::Registrar
1297612976 lua_pop (L, 5 );
1297712977
1297812978 throw_or_assert<std::logic_error>(" Base class is not registered" );
12979+ #if !LUABRIDGE_HAS_EXCEPTIONS
1297912980 return ;
12981+ #endif
1298012982 }
1298112983
1298212984 appendParentList (L, clParentsIndex, visitedIndex, -1 );
@@ -13293,7 +13295,9 @@ class Namespace : public detail::Registrar
1329313295 if (name == std::string_view (" __gc" ))
1329413296 {
1329513297 throw_or_assert<std::logic_error>(" __gc metamethod registration is forbidden" );
13298+ #if !LUABRIDGE_HAS_EXCEPTIONS
1329613299 return *this ;
13300+ #endif
1329713301 }
1329813302
1329913303 if constexpr (sizeof ...(Functions) == 1 )
@@ -14016,7 +14020,9 @@ class Namespace : public detail::Registrar
1401614020 {
1401714021 throw_or_assert<std::logic_error>(" endNamespace() called on global namespace" );
1401814022
14023+ #if !LUABRIDGE_HAS_EXCEPTIONS
1401914024 return Namespace (std::move (*this ));
14025+ #endif
1402014026 }
1402114027
1402214028 LUABRIDGE_ASSERT (m_stackSize > 1 );
@@ -14060,7 +14066,9 @@ class Namespace : public detail::Registrar
1406014066 {
1406114067 throw_or_assert<std::logic_error>(" addProperty() called on global namespace" );
1406214068
14069+ #if !LUABRIDGE_HAS_EXCEPTIONS
1406314070 return *this ;
14071+ #endif
1406414072 }
1406514073
1406614074 detail::push_property_getter (L, std::move (getter), name);
@@ -14082,7 +14090,9 @@ class Namespace : public detail::Registrar
1408214090 {
1408314091 throw_or_assert<std::logic_error>(" addProperty() called on global namespace" );
1408414092
14093+ #if !LUABRIDGE_HAS_EXCEPTIONS
1408514094 return *this ;
14095+ #endif
1408614096 }
1408714097
1408814098 detail::push_property_getter (L, std::move (getter), name);
0 commit comments