workspace: log diagnostic message before returning NotFound to aid debugging.
This commit is contained in:
parent
937cdec324
commit
9505992e00
@ -80,6 +80,7 @@ pub const Api = struct {
|
|||||||
break :blk .{
|
break :blk .{
|
||||||
.inner = .{
|
.inner = .{
|
||||||
.handle = c.dlopen(&library_c, c.RTLD_LAZY | c.RTLD_LOCAL | c.RTLD_NODELETE) orelse {
|
.handle = c.dlopen(&library_c, c.RTLD_LAZY | c.RTLD_LOCAL | c.RTLD_NODELETE) orelse {
|
||||||
|
log.err("Unable to dlopen plugin: {s}", .{library});
|
||||||
return error.FileNotFound;
|
return error.FileNotFound;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@ -98,7 +98,11 @@ pub const Context = struct {
|
|||||||
num_platforms += 1;
|
num_platforms += 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (num_platforms == 0) return error.NotFound;
|
if (num_platforms == 0) {
|
||||||
|
log.err("No platform available", .{});
|
||||||
|
return error.NoPlatformAvailable;
|
||||||
|
}
|
||||||
|
|
||||||
return .{
|
return .{
|
||||||
.platforms = platforms,
|
.platforms = platforms,
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user