hslua-0.9.5.2: A Lua language interpreter embedding in Haskell

Copyright© 2017 Albert Krewinkel
LicenseMIT
MaintainerAlbert Krewinkel <tarleb+hslua@zeitkraut.de>
Stabilitybeta
PortabilityDeriveDataTypeable
Safe HaskellNone
LanguageHaskell98

Foreign.Lua.Types.Error

Contents

Description

Lua exceptions and exception handling.

Synopsis

Documentation

throwLuaError :: String -> Lua a Source #

Raise a LuaException containing the given error message.

modifyLuaError :: Lua a -> (String -> String) -> Lua a Source #

Catch LuaException, alter the error message and rethrow.

tryLua :: Lua a -> Lua (Either LuaException a) Source #

Return either the result of a Lua computation or, if an exception was thrown, the error.

Orphan instances

Alternative Lua Source # 

Methods

empty :: Lua a #

(<|>) :: Lua a -> Lua a -> Lua a #

some :: Lua a -> Lua [a] #

many :: Lua a -> Lua [a] #