summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorDavid Lönnhager <david.l@mullvad.net>2020-02-20 16:35:05 +0100
committerDavid Lönnhager <david.l@mullvad.net>2020-02-20 17:07:52 +0100
commit0c232306300831d23cb8eba00717852739268aaf (patch)
tree40859806a482545070cc543bc6ddf74f7bbb6416
parent2273b5ae56a0954fcec4ad4fe7835f4ea9aeaa10 (diff)
downloadmullvadvpn-0c232306300831d23cb8eba00717852739268aaf.tar.xz
mullvadvpn-0c232306300831d23cb8eba00717852739268aaf.zip
Format error strings in msiutil
-rw-r--r--windows/nsis-plugins/src/msiutil/msiutil.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/windows/nsis-plugins/src/msiutil/msiutil.cpp b/windows/nsis-plugins/src/msiutil/msiutil.cpp
index cf6e467b41..131b52dbcd 100644
--- a/windows/nsis-plugins/src/msiutil/msiutil.cpp
+++ b/windows/nsis-plugins/src/msiutil/msiutil.cpp
@@ -121,9 +121,7 @@ void __declspec(dllexport) NSISCALL SilentInstall
if (ERROR_SUCCESS != installResult)
{
- std::wstringstream ss;
- ss << L"Install failed: " << installResult;
- pushstring(ss.str().c_str());
+ pushstring(common::string::ToWide(common::error::FormatWindowsError(installResult)).c_str());
pushint(NsisStatus::GENERAL_ERROR);
return;
}
@@ -189,9 +187,7 @@ void __declspec(dllexport) NSISCALL SilentUninstall
if (ERROR_SUCCESS != installResult)
{
- std::wstringstream ss;
- ss << L"Uninstall failed: " << installResult;
- pushstring(ss.str().c_str());
+ pushstring(common::string::ToWide(common::error::FormatWindowsError(installResult)).c_str());
pushint(NsisStatus::GENERAL_ERROR);
return;
}