windows-nt/Source/XPSP1/NT/admin/dsutils/displayspecifierupgrade/uiarchive/showerror.cpp

21 lines
389 B
C++
Raw Normal View History

2020-09-26 03:20:57 -05:00
void ShowError(HRESULT hr,
const String &message)
{
LOG_FUNCTION(ShowError);
if(hr==E_FAIL)
{
popup.Error(Win::GetDesktopWindow(),message);
}
else
{
if(message.empty())
{
popup.Error(Win::GetDesktopWindow(),GetErrorMessage(hr));
}
else
{
popup.Error(Win::GetDesktopWindow(),hr,message);
}
}
}