- errorStr = "Empty plugin file name.";
- printfd(__FILE__, "PLUGIN_RUNNER::Load() - %s\n", errorStr.c_str());
- throw Error(errorStr);
+ const std::string msg = "Empty plugin file name.";
+ printfd(__FILE__, "PLUGIN_RUNNER::Load() - %s\n", msg.c_str());
+ throw Error(msg);
+ }
+
+if (access(pluginFileName.c_str(), R_OK))
+ {
+ const std::string msg = "Plugin file '" + pluginFileName + "' is missing or inaccessible.";
+ printfd(__FILE__, "PLUGIN_RUNNER::Load() - %s\n", msg.c_str());
+ throw Error(msg);