---------------------------------------------------------------------
| 67 | |
| 68 | //--------------------------------------------------------------------- |
| 69 | void CheckVersion(const Plugin::IExportPlugin& exportPlugin, |
| 70 | const std::filesystem::path& pluginPath) |
| 71 | { |
| 72 | const auto functionName = "GetExportPluginVersion"; |
| 73 | auto pluginVersion = CallPluginfunction( |
| 74 | [&]() { return exportPlugin.GetExportPluginVersion(); }, |
| 75 | functionName, |
| 76 | pluginPath); |
| 77 | auto currentVersion = Plugin::CurrentExportPluginVersion; |
| 78 | if (pluginVersion != currentVersion) |
| 79 | { |
| 80 | auto error = |
| 81 | "IExportPlugin version missmatch: " |
| 82 | "OpenCppCoverage version is " + |
| 83 | std::to_string(currentVersion) + |
| 84 | " whereas the plugin version is " + std::to_string(pluginVersion); |
| 85 | throw std::runtime_error( |
| 86 | InvalidPluginError(functionName, error, pluginPath)); |
| 87 | } |
| 88 | } |
| 89 | } |
| 90 | |
| 91 | //------------------------------------------------------------------------- |
no test coverage detected