Skip to content
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

Errors in computation may ignore the `pause:-1` command. #11

Open
Mysticial opened this issue Aug 29, 2018 · 2 comments
Open

Errors in computation may ignore the `pause:-1` command. #11

Mysticial opened this issue Aug 29, 2018 · 2 comments

Comments

@Mysticial
Copy link
Owner

@Mysticial Mysticial commented Aug 29, 2018

When the program errors out, it will sometimes ignore the pause:-1 option and pause anyway waiting for the user to press ENTER.

Initially this was by-design. As the user will usually want to know about errors. But I've already had 2 requests to suppress the pause even in the event of an error.

The correct solution is to dump the errors to a log file and exit with the appropriate error code so it can be picked up by scripts.


Internally, the error/exception handling is a mess. Half of the program properly uses C++ exceptions. The other half does an "error-and-exit".

  • Code that properly uses C++ exceptions will gracefully unwind the stack. When control goes back to main(), it is printed out and exits normally (with the proper pause behavior).

  • For the other half of the program that hasn't migrated to the new system yet, it will simply error-and-exit bypassing the proper pause behavior.

@Mysticial
Copy link
Owner Author

@Mysticial Mysticial commented Aug 29, 2018

Version 0.7.6.9484 adds a pause:-2 which should force even errors to not pause. I haven't had the time to really test it yet.

Logging of errors to a file is non-trivial and will be deferred to a future release.

@Mysticial Mysticial added internal cleanup and removed bug labels Oct 14, 2018
@Mysticial
Copy link
Owner Author

@Mysticial Mysticial commented Oct 14, 2018

No longer a bug as it's been patched. But lot of internal cleanup needed internally to make this right.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.