You're right, Philipp: that should be `0`, not LUA_NOREF for the `msgh` parameter (there is no message handler). The result is still -1, however.
As for Chris Beck's point about this being an improper usage: that's how I (and others) initially spoke to the usage of a throw for the user compiling with C++ and wanting a thrown exception to be caught and properly handled without the trampoline. But, it still made me curious. I understand that losing exception information is bad (if Lua does have to do something like that): I would not mind if the behavior was well-defined for exceptions that derived from `std::exception`: e.g., `std::exception::what()` is called, the `c_str()` pushed as the error, and then the message handler called if it exists. (This could also be done for `const char*` throws as well, and then everything else captured with `...` and then written off as "unknown C++ exception handled").
This is really just musing at this point. This only affects a very small part of sol2, where someone directly serializes a `lua_CFunction` and does not do it through any of the typical sol2 mechanics. At this point I would assume if a person is willing to be exposed to the underlying C API in this manner, they're more or less ready to play ball with it.