-
Notifications
You must be signed in to change notification settings - Fork 46
Description
Line 88 in 0fc697b
| rescue DLError |
When dlload in import.rb fails to load it raises an DLError with the message "can't load #{lib}". This is not a very helpful message as it doesn't say anything about why it couldn't load the library.
I've commented out some code for rescuing and re-raising so I could see the original error message, which to me was much more helpful.
Current:
begin
Fiddle.dlopen(lib)
rescue DLError
raise(DLError, "can't load #{lib}")
endModified:
#begin
Fiddle.dlopen(lib)
#rescue DLError
# raise(DLError, "can't load #{lib}")
#endPerhaps the original message can be included in the new one, or rescuing and re-raising could be removed in favor of the original exception.
Some background information: I'm very new to both Fiddle and C/C++ programming, but have been using Ruby for years. I've (tried to) compile my first ever DLL and use it in a Ruby project using Fiddle. When getting an error saying "Can't load", it is very hard to tell if I did something wrong with my DLL, if I've provided the wrong path or if I am using Fiddle incorrectly in any way.