Taskolib  1.3.3
Namespaces | Functions
execute_lua_script.cc File Reference

Detailed Description

Implementation of execute_lua_script() and load_lua_script().

Author
Lars Fröhlich, Marcus Walla
Date
Created on November 15, 2022

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 2.1 of the license, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this program. If not, see https://www.gnu.org/licenses/.

#include <stdexcept>
#include <gul14/replace.h>
#include <gul14/string_view.h>
#include "taskolib/exceptions.h"
#include "taskolib/execute_lua_script.h"
Include dependency graph for execute_lua_script.cc:

Namespaces

 task
 Namespace task contains all Taskolib functions and classes.
 

Functions

gul14::expected< sol::object, std::string > task::execute_lua_script (sol::state &lua, sol::string_view script)
 Execute a Lua script safely, intercepting all possible exceptions that may occur during its execution. More...
 
gul14::expected< sol::load_result, std::string > task::load_lua_script (sol::state &lua, sol::string_view script)
 Load a Lua script into the given Lua state and check its syntax without running it. More...