Skip to content

BadExpectedAccess is not a LuaException #108

@rpatters1

Description

@rpatters1

The fact that BadExpectedAccess is not a LuaException is turning out to be a big issue for me. Errors inside callbacks are caught based on being LuaExceptions. That allows proper throws from C++ to Lua's C longjump and back to my code's C++ environment safely, unwinding all the way out without crashing.

This is also a breaking change. Runtime errors in LB2 generate LuaExceptions. LB3 throws BadExpectedAccess which is currently plain std::exception, though I have proposed it (in #104) as a std::runtime_error in order at least to get a message. But now I'm thinking it should be a LuaException. Or at least it should be transformed into a LuaException up the chain.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions