BUG: LastError can return 0, so handle that case
This commit is contained in:
parent
af721186a1
commit
aef3ca6df8
@ -205,8 +205,12 @@ bool cmLoadCommandCommand::InitialPass(std::vector<std::string> const& args)
|
|||||||
if(!lib)
|
if(!lib)
|
||||||
{
|
{
|
||||||
std::string err = "Attempt to load the library ";
|
std::string err = "Attempt to load the library ";
|
||||||
err += fullPath + " failed. Additional error info is:\n";
|
err += fullPath + " failed.";
|
||||||
|
if ( cmDynamicLoader::LastError() )
|
||||||
|
{
|
||||||
|
err += " Additional error info is:\n";
|
||||||
err += cmDynamicLoader::LastError();
|
err += cmDynamicLoader::LastError();
|
||||||
|
}
|
||||||
this->SetError(err.c_str());
|
this->SetError(err.c_str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user