Skip to content

Commit

Permalink
log
Browse files Browse the repository at this point in the history
  • Loading branch information
Xinyu Li authored and Xinyu Li committed Aug 29, 2024
1 parent b42e8e0 commit ead21a6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/dynamic_module.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class DynamicModule {
#endif
if (handle_ == nullptr) {
if (essential) {
throw std::runtime_error("Library " + target_ + " is unavailable on your system: " + getErrorString());
throw std::runtime_error(getErrorString());
} else {
log::warn("Not found inessential library {} : {}", target, getErrorString());
}
Expand Down Expand Up @@ -115,7 +115,7 @@ class DynamicModule {
}
}
if(essential_){
throw std::runtime_error("Library " + target_ + " is unavailable on your system: " + getErrorString());
throw std::runtime_error(getErrorString());
}
return reinterpret_cast<T>(GetProcAddress(handle_, symbol_name.c_str()));
#else
Expand All @@ -129,7 +129,7 @@ class DynamicModule {
log::info("Lazy loading library {}", target_, getErrorString());
}else{
if(essential_){
throw std::runtime_error("Library " + target_ + " is unavailable on your system: " + getErrorString());
throw std::runtime_error(getErrorString());
}
}
return reinterpret_cast<T>(dlsym(handle_, symbol_name.c_str()));
Expand Down

0 comments on commit ead21a6

Please sign in to comment.