mirror of
https://github.com/ThePhD/sol2.git
synced 2024-03-22 13:10:44 +08:00
Correct spelling is hard.
This commit is contained in:
parent
fd33df50e1
commit
22e17eb9fd
|
@ -52,7 +52,7 @@ Testing in `this closed issue`_ that it doesn't play nice on 64-bit Linux in man
|
|||
Lua and LuaJIT C++ Exception Full Interoperability
|
||||
--------------------------------------------------
|
||||
|
||||
You can ``#define SOL_EXCEPTIONS_SAFE_PROPOGATION`` before including Sol or define ``SOL_EXCEPTIONS_SAFE_PROPOGATION`` on the command line if you know your implmentation of Lua has proper unwinding semantics that can be thrown through the version of the Lua API you have built / are using.
|
||||
You can ``#define SOL_EXCEPTIONS_SAFE_PROPAGATION`` before including Sol or define ``SOL_EXCEPTIONS_SAFE_PROPAGATION`` on the command line if you know your implmentation of Lua has proper unwinding semantics that can be thrown through the version of the Lua API you have built / are using.
|
||||
|
||||
This will prevent sol from catching ``(...)`` errors in platforms and compilers that have full C++ exception interoperability. This means that Lua errors can be caught with ``catch (...)`` in the C++ end of your code after it goes through Lua, and exceptions can pass through the Lua API and Stack safely.
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ namespace sol {
|
|||
catch (const std::exception& e) {
|
||||
lua_pushstring(L, e.what());
|
||||
}
|
||||
#if !defined(SOL_EXCEPTIONS_SAFE_PROPOGATION)
|
||||
#if !defined(SOL_EXCEPTIONS_SAFE_PROPAGATION)
|
||||
catch (...) {
|
||||
lua_pushstring(L, "caught (...) exception");
|
||||
}
|
||||
|
@ -76,7 +76,7 @@ namespace sol {
|
|||
catch (const std::exception& e) {
|
||||
lua_pushstring(L, e.what());
|
||||
}
|
||||
#if !defined(SOL_EXCEPTIONS_SAFE_PROPOGATION)
|
||||
#if !defined(SOL_EXCEPTIONS_SAFE_PROPAGATION)
|
||||
catch (...) {
|
||||
lua_pushstring(L, "caught (...) exception");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user