| 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.
Synopsis
- 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.
Constructors
| LuaException String |
Instances
| Eq LuaException Source # | |
Defined in Foreign.Lua.Types.Error | |
| Show LuaException Source # | |
Defined in Foreign.Lua.Types.Error Methods showsPrec :: Int -> LuaException -> ShowS # show :: LuaException -> String # showList :: [LuaException] -> ShowS # | |
| Exception LuaException Source # | |
Defined in Foreign.Lua.Types.Error Methods toException :: LuaException -> SomeException # fromException :: SomeException -> Maybe LuaException # displayException :: LuaException -> String # | |
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.