-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Improve Crystal::Loader
errors
#11860
Improve Crystal::Loader
errors
#11860
Conversation
new(String.build do |io| | ||
io << message | ||
io << " (" | ||
io.write_string(Slice.new(char_pointer, LibC.strlen(char_pointer))) | ||
io << ")" | ||
end) |
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.
Using String.build
here to avoid two intermediary string allocations. Maybe that's overkill for error handling...
Trying to test out this code. And I cannot even run
|
Looks as if your |
This patch improves error messages from
dlopen
. They're now also shown for lib arguments (-lfoo
) which was missing. Also adds fault tolerance whendlerror
returns a null pointer./ref #11857