hslua-core-2.1.0: Bindings to Lua, an embeddable scripting language
Copyright© 2017-2022 Albert Krewinkel
LicenseMIT
MaintainerAlbert Krewinkel <tarleb+hslua@zeitkraut.de>
Safe HaskellNone
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 :: 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.