mirror of
https://github.com/ThePhD/sol2.git
synced 2024-03-22 13:10:44 +08:00
Print aux_message if there is not message
This commit is contained in:
parent
9c882a28fd
commit
e8e122e9ce
|
@ -84,7 +84,7 @@ namespace sol {
|
||||||
|
|
||||||
inline int push_type_panic_string(lua_State* L, int index, type expected, type actual, string_view message, string_view aux_message) noexcept {
|
inline int push_type_panic_string(lua_State* L, int index, type expected, type actual, string_view message, string_view aux_message) noexcept {
|
||||||
const char* err = message.size() == 0
|
const char* err = message.size() == 0
|
||||||
? (aux_message.size() == 0 ? "stack index %d, expected %s, received %s" : "stack index %d, expected %s, received %s: %s")
|
? (aux_message.size() == 0 ? "stack index %d, expected %s, received %s" : "stack index %d, expected %s, received %s: %s%s")
|
||||||
: "stack index %d, expected %s, received %s: %s %s";
|
: "stack index %d, expected %s, received %s: %s %s";
|
||||||
const char* type_name = expected == type::poly ? "anything" : lua_typename(L, static_cast<int>(expected));
|
const char* type_name = expected == type::poly ? "anything" : lua_typename(L, static_cast<int>(expected));
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user