hslua-core-2.3.2: Bindings to Lua, an embeddable scripting language

Copyright | © 2017-2024 Albert Krewinkel
License | MIT
Maintainer | Albert Krewinkel <tarleb@hslua.org>
Safe Haskell | None
Language | Haskell2010

HsLua.Core.Trace

Description

Helper functions to call Lua functions with tracebacks.

Synopsis

- pcallTrace :: NumArgs -> NumResults -> LuaE e Status
- callTrace :: LuaError e => NumArgs -> NumResults -> LuaE e ()
- dofileTrace :: Maybe FilePath -> LuaE e Status
- dostringTrace :: ByteString -> LuaE e Status

# Documentation

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

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 () #

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

dofileTrace :: Maybe FilePath -> LuaE e Status #

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

dostringTrace :: ByteString -> LuaE e Status #