From fe00cc320396bc7ac301a22592b718792ae49adf Mon Sep 17 00:00:00 2001 From: Haru Date: Mon, 12 Jan 2015 16:38:48 +0100 Subject: Added detailed error message when a plugin fails to load - This helps figuring out why a plugin can't be loaded (especially on linux systems.) - Special thanks to Dastgir. Signed-off-by: Haru --- src/common/HPM.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/common/HPM.c') diff --git a/src/common/HPM.c b/src/common/HPM.c index 92b9702d4..c361ad31c 100644 --- a/src/common/HPM.c +++ b/src/common/HPM.c @@ -141,8 +141,9 @@ struct hplugin *hplugin_load(const char* filename) { plugin = HPM->create(); - if( !( plugin->dll = plugin_open(filename) ) ){ - ShowWarning("HPM:plugin_load: failed to load '"CL_WHITE"%s"CL_RESET"', skipping...\n", filename); + if (!(plugin->dll = plugin_open(filename))) { + char buf[1024]; + ShowWarning("HPM:plugin_load: failed to load '"CL_WHITE"%s"CL_RESET"' (error: %s), skipping...\n", filename, plugin_geterror(buf)); HPM->unload(plugin); return NULL; } -- cgit v1.2.3-60-g2f50