| 363 | |
| 364 | namespace stack_detail { |
| 365 | inline error get_error(lua_State* L, int target) { |
| 366 | auto maybe_exc = stack::check_get<error&>(L, target); |
| 367 | if (maybe_exc.has_value()) { |
| 368 | return maybe_exc.value(); |
| 369 | } |
| 370 | return error(detail::direct_error, stack::get<std::string>(L, target)); |
| 371 | } |
| 372 | |
| 373 | inline detail::error_exception get_error_exception(lua_State* L, int target) { |
| 374 | auto maybe_exc = stack::check_get<detail::error_exception&>(L, target); |