Copyright | © 2017 Albert Krewinkel |
---|---|
License | MIT |
Maintainer | Albert Krewinkel <tarleb+hslua@zeitkraut.de> |
Stability | beta |
Portability | DeriveDataTypeable |
Safe Haskell | None |
Language | Haskell98 |
Lua exceptions and exception handling.
- data LuaException = LuaException String
- catchLuaError :: Lua a -> (LuaException -> Lua a) -> Lua a
- throwLuaError :: String -> Lua a
- modifyLuaError :: Lua a -> (String -> String) -> Lua a
- tryLua :: Lua a -> Lua (Either LuaException a)
Documentation
data LuaException Source #
Exceptions raised by Lua-related operations.
catchLuaError :: Lua a -> (LuaException -> Lua a) -> Lua a Source #
Catch a
.LuaException
throwLuaError :: String -> Lua a Source #
Raise a
containing the given error message.LuaException
modifyLuaError :: Lua a -> (String -> String) -> Lua a Source #
Catch
, alter the error message and rethrow.LuaException
tryLua :: Lua a -> Lua (Either LuaException a) Source #
Return either the result of a Lua computation or, if an exception was thrown, the error.