aymara / lima

The Libre Multilingual Analyzer, a Natural Language Processing (NLP) C++ toolkit.
http://aymara.github.io/lima/
Other
107 stars 21 forks source link

added error log message for all tried paths #164 #166

Closed anuraag-khare closed 1 year ago

anuraag-khare commented 1 year ago

What is this change?

This PR adds additional logs to print error messages for all the tried supplementary search paths if lib not found.

Does this PR resolve or contribute to any issues?

This PR contributes towards issue #164 for adding error logs.

kleag commented 1 year ago

Thanks a lot for your PR. It implements most of what I was thinking for #164 but the messages should not include only the file name but also the error string obtained with libhandle->errorString(). This is because the library can in fact be found but fail to load due to a missing symbol for example. The message could be:

Failed to load <library> from <filename> due to <errorString>
anuraag-khare commented 1 year ago

Thanks a lot for your PR. It implements most of what I was thinking for #164 but the messages should not include only the file name but also the error string obtained with libhandle->errorString(). This is because the library can in fact be found but fail to load due to a missing symbol for example. The message could be:

Failed to load <library> from <filename> due to <errorString>

Thanks for correction. refactored the error string.

kleag commented 1 year ago

There is still a little problem: the errorString that you have added to the debug message comes from the last failure while it should come from the failure associated to the path. So you have to forge your message when you add data to triedPaths at line 192, or store pairs (path, error string) in triedPaths and forge the messages when using them.

anuraag-khare commented 1 year ago

There is still a little problem: the errorString that you have added to the debug message comes from the last failure while it should come from the failure associated to the path. So you have to forge your message when you add data to triedPaths at line 192, or store pairs (path, error string) in triedPaths and forge the messages when using them.

done modification.