diff --git a/single/sol/sol.hpp b/single/sol/sol.hpp index 9d4688dc..01bcc50a 100644 --- a/single/sol/sol.hpp +++ b/single/sol/sol.hpp @@ -20,8 +20,8 @@ // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // This file was generated with a script. -// Generated 2017-11-17 12:20:03.514818 UTC -// This header was generated with sol v2.18.6 (revision fa912a5) +// Generated 2017-11-17 21:50:58.352644 UTC +// This header was generated with sol v2.18.6 (revision 4a39020) // https://github.com/ThePhD/sol2 #ifndef SOL_SINGLE_INCLUDE_HPP @@ -4949,7 +4949,7 @@ namespace sol { userdata = LUA_TUSERDATA, lightuserdata = LUA_TLIGHTUSERDATA, table = LUA_TTABLE, - poly = none | lua_nil | string | number | thread | table | boolean | function | userdata | lightuserdata + poly = -0xFFFF }; inline const std::string& to_string(call_status c) { @@ -5811,7 +5811,7 @@ namespace sol { }; (void)detail::swallow{int(), (action(detail::demangle()), int())...}; addendum += ")')"; - return type_panic_string(L, index, expected, actual, message + addendum); + return type_panic_string(L, index, expected, actual, message.empty() ? addendum : message + addendum); } }; diff --git a/sol/error_handler.hpp b/sol/error_handler.hpp index 0c0bdbed..18c103f2 100644 --- a/sol/error_handler.hpp +++ b/sol/error_handler.hpp @@ -84,21 +84,23 @@ namespace sol { struct constructor_handler { int operator()(lua_State* L, int index, type expected, type actual, const std::string& message) const noexcept(false) { - return type_panic_string(L, index, expected, actual, message + " (type check failed in constructor)"); + std::string str = "(type check failed in constructor)"; + return type_panic_string(L, index, expected, actual, message.empty() ? str : message + " " + str); } }; template struct argument_handler { int operator()(lua_State* L, int index, type expected, type actual, const std::string& message) const noexcept(false) { - return type_panic_string(L, index, expected, actual, message + " (bad argument to variable or function call)"); + std::string str = "(bad argument to variable or function call)"; + return type_panic_string(L, index, expected, actual, message.empty() ? str : message + " " + str ); } }; template struct argument_handler> { int operator()(lua_State* L, int index, type expected, type actual, const std::string& message) const noexcept(false) { - std::string addendum = " (bad argument into '"; + std::string addendum = "(bad argument into '"; addendum += detail::demangle(); addendum += "("; int marker = 0; @@ -111,7 +113,7 @@ namespace sol { }; (void)detail::swallow{int(), (action(detail::demangle()), int())...}; addendum += ")')"; - return type_panic_string(L, index, expected, actual, message + addendum); + return type_panic_string(L, index, expected, actual, message.empty() ? addendum : message + " " + addendum); } }; diff --git a/sol/types.hpp b/sol/types.hpp index b37cb67d..cbdb98d7 100644 --- a/sol/types.hpp +++ b/sol/types.hpp @@ -617,7 +617,7 @@ namespace sol { userdata = LUA_TUSERDATA, lightuserdata = LUA_TLIGHTUSERDATA, table = LUA_TTABLE, - poly = none | lua_nil | string | number | thread | table | boolean | function | userdata | lightuserdata + poly = -0xFFFF }; inline const std::string& to_string(call_status c) {