hslua-core-2.3.2: Bindings to Lua, an embeddable scripting language
Copyright© 2017-2024 Albert Krewinkel
LicenseMIT
MaintainerAlbert Krewinkel <tarleb@hslua.org>
Safe HaskellSafe-Inferred
LanguageHaskell2010

HsLua.Core.Trace

Description

Helper functions to call Lua functions with tracebacks.

Synopsis

Documentation

pcallTrace :: NumArgs -> NumResults -> LuaE e Status Source #

Like pcall, but sets an appropriate message handler function, thereby adding a stack traceback if an error occurs.

callTrace :: LuaError e => NumArgs -> NumResults -> LuaE e () Source #

Like call, but adds a traceback if an error occurs.

dofileTrace :: Maybe FilePath -> LuaE e Status Source #

Run the given file as a Lua program, while also adding a traceback to the error message if an error occurs.