| 722 | // the function pointer will be set to nullptr. |
| 723 | template <class T> |
| 724 | void loadClientFunction(T* fp, void* lib, std::string libPath, const char* functionName, bool requireFunction) { |
| 725 | *(void**)(fp) = loadFunction(lib, functionName); |
| 726 | if (*fp == nullptr && requireFunction) { |
| 727 | TraceEvent(SevError, "ErrorLoadingFunction").detail("LibraryPath", libPath).detail("Function", functionName); |
| 728 | throw platform_error(); |
| 729 | } |
| 730 | } |
| 731 | |
| 732 | DLApi::DLApi(std::string fdbCPath, bool unlinkOnLoad) |
| 733 | : fdbCPath(fdbCPath), api(new FdbCApi()), unlinkOnLoad(unlinkOnLoad), networkSetup(false) {} |
no test coverage detected