You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For free C++ lambdas that capture variables and throw exceptions, the exception's what() message isn't returned in the sol error. Instead I might get something from the stack. If the lambda doesn't capture anything then everything works as expected.
This doesn't seem to be happen for lambdas registered on user types, but only when they're registered as global Lua functions. The error message returned when the function is wrapped in sol::yielding is slightly different, but the same issue occurs with or without sol::yielding.
I'm using Visual Studio 2019, latest sol single header (revision 82812c5 generated 2020-03-31 04:18:51.740568 UTC).
[sol3] An error occurred and has been passed to an error handler: sol: CRITICAL_EXCEPTION_FAILURE error: hi
Exception: sol: CRITICAL_EXCEPTION_FAILURE error: hi
This is what I expect:
[sol3] An exception occurred: expected
[sol3] An error occurred and has been passed to an error handler: sol: runtime error: expected
stack traceback:
[C]: in function 'f'
[string "f("hi")"]:1: in main chunk
Exception: sol: runtime error: expected
stack traceback:
[C]: in function 'f'
[string "f("hi")"]:1: in main chunk
I also noticed the same issue when using function objects:
Hi, I was investigating a similar error and found that by commenting out the catch(...) in trampoline.hpp I get the expected detailed message. It'll probably break something else, so I'm not sure if this helps in any way.
- Add a flag to allow size_t(-1) and similar shenanigans (SOL_ALL_INTEGER_VALUES_FIT)
- Half-fix, but not fully, for #1183, #1072, #1038, #965
- Fix#1126
- Prepare for #1061
Hi!
This might be is related to my last issue #906
For free C++ lambdas that capture variables and throw exceptions, the exception's
what()
message isn't returned in the sol error. Instead I might get something from the stack. If the lambda doesn't capture anything then everything works as expected.This doesn't seem to be happen for lambdas registered on user types, but only when they're registered as global Lua functions. The error message returned when the function is wrapped in sol::yielding is slightly different, but the same issue occurs with or without sol::yielding.
I'm using Visual Studio 2019, latest sol single header (revision 82812c5 generated 2020-03-31 04:18:51.740568 UTC).
This is what I get:
This is what I expect:
I also noticed the same issue when using function objects:
The text was updated successfully, but these errors were encountered: