HsLua.Core.Trace

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

Copyright | © 2017-2022 Albert Krewinkel
License | MIT
Maintainer | Albert Krewinkel <tarleb+hslua@zeitkraut.de>
Safe Haskell | Safe-Inferred
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 :: 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 :: 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 #