[introspection] Improve error message when failing to find a native library. (#2573)
This commit is contained in:
Родитель
49fa0ca724
Коммит
f90655bd05
|
@ -232,7 +232,10 @@ namespace Introspection {
|
|||
|
||||
string path = FindLibrary (f.LibraryName);
|
||||
IntPtr lib = Dlfcn.dlopen (path, 0);
|
||||
if (Dlfcn.GetIndirect (lib, name) == IntPtr.Zero) {
|
||||
if (lib == IntPtr.Zero) {
|
||||
ReportError ("Could not open the library '{0}' to find the field '{1}': {2}", path, name, Dlfcn.dlerror ());
|
||||
failed_fields.Add (name);
|
||||
} else if (Dlfcn.GetIndirect (lib, name) == IntPtr.Zero) {
|
||||
ReportError ("Could not find the field '{0}' in {1}", name, path);
|
||||
failed_fields.Add (name);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче