lua: fix `print` wrapper to handle errors thrown from `print`
Both of the callbacks in the `print` wrapper are expected to be called, but `print` may throw errors, e.g., `print(setmetatable({}, {__tostring = error})`, so we need to call it in a protected environment and execute the 'after' callback even if `print` throws. Closes #8136 NO_CHANGELOG=<gh-7186 was not released yet> NO_DOC=bugfix
Please register or sign in to comment