| Copyright | © 2017 Albert Krewinkel |
|---|---|
| License | MIT |
| Maintainer | Albert Krewinkel <tarleb+hslua@zeitkraut.de> |
| Stability | beta |
| Portability | DeriveDataTypeable |
| Safe Haskell | None |
| Language | Haskell98 |
Foreign.Lua.Types.Error
Contents
Description
Lua exceptions and exception handling.
- data LuaException = LuaException String
- catchLuaError :: Lua a -> (LuaException -> Lua a) -> Lua a
- throwLuaError :: String -> Lua a
- tryLua :: Lua a -> Lua (Either LuaException a)
Documentation
data LuaException Source #
Exceptions raised by Lua-related operations.
Constructors
| LuaException String |
Instances
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
tryLua :: Lua a -> Lua (Either LuaException a) Source #
Return either the result of a Lua computation or, if an exception was thrown, the error.