-
Notifications
You must be signed in to change notification settings - Fork 75
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
Replaced perror() calls with an error buffer. Issue #10 #49
base: master
Are you sure you want to change the base?
Conversation
Changed to WIP until the previous PR is merged. |
It would be easier to me to review chnages in isolation, rather than on top of each other. How's your git-fu wrt branches? Are you able to submit each individual change from a different branch? |
Yes, that's what I plan to do next, I just kinda forgot about it while resolving the first issue. Sorry for a little mess. |
d76d6f4
to
651c71d
Compare
Note: removed irrelevant commits in this PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Basic testing shows this behaves mostly as expected, thanks!
As far as API goes, it would be really nice if I could get the concentrated error message programmatically without printing it to stderr. Imagine this scenarios:
- I develop a GUI and I want to process an STL file. When I open it and an error happens, I want to show the message in a GUI error window.
- I develop Python bindings. When Python code opens the STL file and an error happens I want to include the entire message in the Python exception.
Currently, I can only get the error_buffer
part, or print the full error message to stdout.
Oh, ignore me, I must have been tired when writing this. The entire error message is stored in the error attribute, as it should be. |
Co-authored-by: Miro Hrončok <miro@hroncok.cz>
Fixes the issue #10. As @hroncok suggested, any subsequent call will replace the current message without concatenation.