summaryrefslogtreecommitdiff
path: root/src/error.rs
AgeCommit message (Collapse)Author
2021-04-16Make error::Error non_exhaustiveAlex Orlenko
2021-04-15Improve panic handling (check for twice resumed panics)Alex Orlenko
2020-12-31Update documentationAlex Orlenko
2020-12-14Serde support (serialize feature flag)Alex Orlenko
2020-06-07Refactor main_state handlingAlex Orlenko
Don't allow to set hook if main_state is not available Remove Lua 5.1 dirty hack
2020-05-12Provide safe and unsafe Lua modes:Alex Orlenko
- In safe mode Lua would not have ability to load C code via `require` or `package.loadlib` - Unsafe mode allows everything.
2020-05-12Use Rust allocator for new Lua states that allows to set memory limitAlex Orlenko
2020-05-11Hide Lua "Send" capability under the optional "send" feature flagAlex Orlenko
2020-05-11Add Send capability to LuaAlex Orlenko
2020-04-17v0.3.0-alpha.1 with async supportAlex Orlenko
Squashed commit of the async branch.
2020-04-15Cherry-pick changes from rlua:Alex Orlenko
- Make Value::type_name() public - Update CallbackError and ExternalError Display impl
2019-11-30Add Lua 5.2 supportAlex Orlenko
2019-10-17Lua 5.1 supportAlex Orlenko
2019-10-01Rename to mluaAlex Orlenko
2019-09-29Backport changes from rlua 0.16 (master branch)Alex Orlenko
2019-09-29Add dyn to trait objectsAlex Orlenko
2018-10-01Some documentation and changelog fixeskyren
2018-09-16Move integration tests into top-level tests directorykyren
other minor refactors
2018-08-05Update to failure 0.1.2, rename deprecated methodskyren
2018-06-29Prepare for 0.14.0 releasekyren
2018-03-20Use git dependency on failure 1.0 for right nowkyren
2018-02-09Error correctly on too many arguments / returns / binds / recursionskyren
There are also some other drive-by changes to fix panicking in extern "C" functions and other edge case stack errors
2018-02-09Explicit error type for destructed callbackskyren
Also removes some cleverness if debug_assertions was disabled, as it really doesn't make much of a performance difference.
2018-02-06Don't panic on mismatched `RegistryKey` use, instead return errorkyren
2018-01-27Simplify handling of userdata __gc and resurrected userdata.kyren
Now, simply remove the userdata table immediately before dropping the userdata. This does two things, it prevents __gc from double dropping the userdata, and after the first call to __gc, it prevents the userdata from being identified as any particular userdata type, so it cannot be misused after being finalized. This change thus removes the userdata invalidation error, and simplifies a lot of userdata handling code. It also fixes a panic bug. Because there is no predictable order for finalizers, it is possible to run a userdata finalizer that does not resurrect itself before a lua table finalizer that accesses that userdata, and this means that there were several asserts that were possible to trigger in normal Lua code in util.rs related to `WrappedError`. Now, finalized userdata is simply a userdata with no methods, so any use of finalized userdata becomes a normal script runtime error (though, with a potentially confusing error message). As a future improvement, we could set a metatable on finalized userdata that provides a better error message.
2018-01-26Fix rustdoc rendering warningJonas Schievink
2018-01-26Don't use a `StdResult` alias for better docs.Jonas Schievink
This is a pretty opinionated change, but I find documentation to be clearer when using plain old names everybody understands immediately.
2018-01-21Experimentally use the `failure` crate for errorskyren
2017-12-05spelling fix for my spelling fixkyren
2017-12-05spelling fixeskyren
2017-12-04Add `ExpiredUserData` error and avoid what was previously a panickyren
Also make sure that panic messages clearly state that they are internal errors, so people report them as a bug. Since the only panics left are all internal errors, just move the internal error message into the panic / assert macros.
2017-12-04Couple of changes:kyren
- Update readme, changelog, cargo version number in preparation for release - Remove panicking behavior on recursive callback calls, add additional error variant for recursive callback errors.
2017-12-04Move function and thread into their own modules, auto-formattingkyren
2017-12-04Include garbage collector error type, remove unnecessary setmetatable wrapperkyren
2017-10-26Correctly wrap external errors so that Debug trait and Error::cause are correctkyren
2017-09-26Print CallbackError in a better waykyren
CallbackError now, instead of displaying the cause description, instead prints "callback error: <traceback>". Since the cause is already in the cause chain of the error, this avoids repeatedly printing the cause of callback errors along the chain, and also actually prints the callback when using Display on each error in the chain.
2017-08-03autoformattingkyren
2017-08-02Remove ErrorErrorJonas Schievink
2017-08-02Remove expected field from FromLuaConversionErrorJonas Schievink
2017-08-01Remove "lua" prefix from error messagesJonas Schievink
Since this is `rlua::Error`, it should be clear that it refers to Lua-related errors. Downstream crates want to define their own error enums, which can add a prefix like "lua error:" to disambiguate.
2017-08-01Merge IncompleteStatement into SyntaxErrorJonas Schievink
Both are a form of syntax error, this reflects that better. No functionality is lost, incomplete inputs are moved to a bool field of SyntaxError.
2017-08-01Fix handling of `CallbackError`Jonas Schievink
Previously, the traceback would be printed, but not the actual error. I've removed traceback printing completely, not sure if that's a good idea. A `Display` impl that outputs multiple lines feels weird.
2017-08-01Enhance error messagesJonas Schievink
2017-07-28Small typo fixkyren
2017-07-28Document `Error`Jonas Schievink
I didn't yet document *everything* there is to say (in particular, how exactly custom Rust errors can be passed through Lua), but I've some changes to this type in mind that I'll do next.
2017-07-24auto formattingkyren
2017-07-24Slight changes for consistencykyren
I am not actually sure what the best pattern is to import conflicting standard types, but this is at least consistent.
2017-07-24Do several more Lua prefix renames, add prelude modulekyren
Rename the following: LuaNil => Nil LuaExternalError => ExternalError LuaExternalResult => ExternalResult LuaCallback => Callback (internal only) Use qualified re-exports at the top of the module. Add a new public 'prelude' module which re-exports everything with a non-conflicting name (Adds back the Lua prefix), and is meant to be imported unqualified.
2017-07-23Continue renames in comments/stringsJonas Schievink
2017-07-23Remove the `Lua*` prefix from most typesJonas Schievink
cc #15 Doesn't touch `LuaString` mainly because that's a *lot* of renaming work and the code looks weird. Also I want feedback before I proceed.