MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / safe_script_file

Method safe_script_file

extlibs/sol3/include/sol/sol.hpp:24640–24646  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24638
24639 template <typename Fx, meta::disable_any<meta::is_string_constructible<meta::unqualified_t<Fx>>, meta::is_specialization_of<meta::unqualified_t<Fx>, basic_environment>> = meta::enabler>
24640 protected_function_result safe_script_file(const std::string& filename, Fx&& on_error, load_mode mode = load_mode::any) {
24641 protected_function_result pfr = do_file(filename, mode);
24642 if (!pfr.valid()) {
24643 return on_error(L, std::move(pfr));
24644 }
24645 return pfr;
24646 }
24647
24648 template <typename Fx, typename E>
24649 protected_function_result safe_script_file(const std::string& filename, const basic_environment<E>& env, Fx&& on_error, load_mode mode = load_mode::any) {

Callers 4

loadGameObjectMethod · 0.80
initScriptMethod · 0.80
runMethod · 0.80
loadMethod · 0.80

Calls 2

on_errorFunction · 0.85
validMethod · 0.45

Tested by

no test coverage detected