-
-
Notifications
You must be signed in to change notification settings - Fork 537
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Am I just doing something wrong? #1489
Comments
You cannot use libraries like math unless you open them, so thats that. You can open all libraries with As for the simpler statement REPLs may add a workaround where they add
|
What exactly is being printed and in what situation? |
@Rochet2 Sol2 is printing any errors that I catch to the console as well as passing them to my exception handler. For example, if I cause a runtime error (via
As well as this on the console (SSH):
And I'm wondering how to prevent that (do I need to pass in a custom lambda for the error handler?). |
Hmm, do you happen to have SOL_PRINT_ERRORS set on? Looks like it might print, as seen here |
@Rochet2 .... No? I never defined it, just enabled all safeties so maybe that enabled it? |
Even though the doc says that SOL_PRINT_ERRORS 'Not turned on by default', in reality, it is enabled by SOL_ALL_SAFETIES_ON. Given that most people define SOL_ALL_SAFETIES_ON it would be also wise to define them both:
As it's a rarely a good idea to output something to |
Sounds like unintended bug then. I cant see why documentation would say different than actual behaviour. Make a PR to disable it by default if not set? |
I've read the docs and am trying to build a REPL, of sorts, in a QT application. The application is a TCP-based game (kinda like a MUD of old) and I'm running into an issue that just seems... Really weird. I'm using QT, so maybe translation is going wrong there, but I (don't) think so, since my debug output looks fine. If I try to execute a simple bit of Lua code like "3+2" or "3.33", I get a syntax error. If I try to execute a math function (I added my own math table) (say,
math.sqrt(88.5)
), a panic occurs. I haven't opened any libraries, so maybe that's why, but I'm executing evaluations like this:(As an aside, Sol2 is printing stuff to the console... Is there some way of preventhing that?)
The text was updated successfully, but these errors were encountered: