Skip to content

Commit 3a19dfb

Browse files
committed
Fix load_dso error message sometimes being suppressed
1 parent 4ceb494 commit 3a19dfb

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

panda/src/display/graphicsPipeSelection.cxx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,8 +397,9 @@ load_named_module(const string &name) {
397397
<< "loading display module: " << dlname.to_os_specific() << std::endl;
398398
void *handle = load_dso(get_plugin_path().get_value(), dlname);
399399
if (handle == nullptr) {
400+
std::string error = load_dso_error();
400401
display_cat.warning()
401-
<< "Unable to load: " << load_dso_error() << std::endl;
402+
<< "Unable to load " << dlname.get_basename() << ": " << error << std::endl;
402403
return TypeHandle::none();
403404
}
404405

panda/src/movies/movieTypeRegistry.cxx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,10 @@ load_audio_types() {
123123
<< "loading audio type module: " << name << endl;
124124
void *tmp = load_dso(get_plugin_path().get_value(), dlname);
125125
if (tmp == nullptr) {
126+
std::string error = load_dso_error();
126127
movies_cat.warning()
127128
<< "Unable to load " << dlname.to_os_specific()
128-
<< ": " << load_dso_error() << endl;
129+
<< ": " << error << endl;
129130
} else if (movies_cat.is_debug()) {
130131
movies_cat.debug()
131132
<< "done loading audio type module: " << name << endl;
@@ -252,9 +253,10 @@ load_video_types() {
252253
<< "loading video type module: " << name << endl;
253254
void *tmp = load_dso(get_plugin_path().get_value(), dlname);
254255
if (tmp == nullptr) {
256+
std::string error = load_dso_error();
255257
movies_cat.warning()
256258
<< "Unable to load " << dlname.to_os_specific()
257-
<< ": " << load_dso_error() << endl;
259+
<< ": " << error << endl;
258260
} else if (movies_cat.is_debug()) {
259261
movies_cat.debug()
260262
<< "done loading video type module: " << name << endl;
@@ -294,9 +296,10 @@ load_movie_library(const string &name) {
294296
void *tmp = load_dso(get_plugin_path().get_value(), dlname);
295297

296298
if (tmp == nullptr) {
299+
std::string error = load_dso_error();
297300
movies_cat.warning()
298301
<< "Unable to load " << dlname.to_os_specific()
299-
<< ": " << load_dso_error() << endl;
302+
<< ": " << error << endl;
300303
} else if (movies_cat.is_debug()) {
301304
movies_cat.debug()
302305
<< "done loading video type module: " << name << endl;

0 commit comments

Comments
 (0)