| 448 | } |
| 449 | |
| 450 | std::string toString(const sol::object& obj) |
| 451 | { |
| 452 | if (obj == sol::nil) |
| 453 | return "nil"; |
| 454 | else if (obj.get_type() == sol::type::string) |
| 455 | return "\"" + obj.as<std::string>() + "\""; |
| 456 | else |
| 457 | return call(sol::state_view(obj.lua_state())["tostring"], obj); |
| 458 | } |
| 459 | |
| 460 | std::string Internal::formatCastingError(const sol::object& obj, const std::type_info& t) |
| 461 | { |
no test coverage detected