Skip to content

Commit 6b1825c

Browse files
rhaschkenuclearsandwich
authored andcommitted
improve warning message (#108)
- include library name - nicer formatting
1 parent dd0b458 commit 6b1825c

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/class_loader.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,11 @@ int ClassLoader::unloadLibraryInternal(bool lock_plugin_ref_count)
116116
}
117117

118118
if (plugin_ref_count_ > 0) {
119-
CONSOLE_BRIDGE_logWarn("%s",
120-
"class_loader.ClassLoader: "
121-
"SEVERE WARNING!!! Attempting to unload library while objects created by this loader "
122-
"exist in the heap! "
123-
"You should delete your objects before attempting to unload the library or "
124-
"destroying the ClassLoader. The library will NOT be unloaded.");
119+
CONSOLE_BRIDGE_logWarn("class_loader.ClassLoader: SEVERE WARNING!!!\n"
120+
"Attempting to unload %s\n"
121+
"while objects created by this library still exist in the heap!\n"
122+
"You should delete your objects before destroying the ClassLoader. "
123+
"The library will NOT be unloaded.", library_path_.c_str());
125124
} else {
126125
load_ref_count_ = load_ref_count_ - 1;
127126
if (0 == load_ref_count_) {

0 commit comments

Comments
 (0)