From c5987ac1e233e1093485d38154d8896e4bb6ee44 Mon Sep 17 00:00:00 2001 From: a1xd <68629610+a1xd@users.noreply.github.com> Date: Mon, 5 Oct 2020 23:14:21 -0400 Subject: improve installer + docs improve exception handling add link to vcr redist in install section of guide --- doc/Guide.md | 4 +++- installer/installer.cpp | 5 ++++- uninstaller/uninstaller.cpp | 5 ++++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/doc/Guide.md b/doc/Guide.md index 5f18e02..c3498ac 100644 --- a/doc/Guide.md +++ b/doc/Guide.md @@ -1,7 +1,9 @@ # Raw Accel Guide ## Installation -Run `installer.exe` in the release directory to install the Raw Accel driver. Restart your computer for the installation to take effect. + +Run `installer.exe` in the release directory to install the Raw Accel driver. Restart your computer for the installation to take effect. +* If you encounter a `VCRUNTIME` related system error, [download and install the latest version from Microsoft.](https://aka.ms/vs/16/release/vc_redist.x64.exe) Run `uninstaller.exe` in the release directory to uninstall the driver. Restart for the uninstallation to take effect. diff --git a/installer/installer.cpp b/installer/installer.cpp index 03c8881..06f234e 100644 --- a/installer/installer.cpp +++ b/installer/installer.cpp @@ -76,7 +76,10 @@ int main() { std::cout << "Install complete, change will take effect after restart.\n"; } - catch (std::exception e) { + catch (const std::system_error& e) { + std::cerr << "Error: " << e.what() << ' ' << e.code() << '\n'; + } + catch (const std::exception& e) { std::cerr << "Error: " << e.what() << '\n'; } diff --git a/uninstaller/uninstaller.cpp b/uninstaller/uninstaller.cpp index 4d02715..8d9e890 100644 --- a/uninstaller/uninstaller.cpp +++ b/uninstaller/uninstaller.cpp @@ -20,7 +20,10 @@ int main() { } std::cout << "Removal complete, change will take effect after restart.\n"; } - catch (std::exception e) { + catch (const std::system_error& e) { + std::cerr << "Error: " << e.what() << ' ' << e.code() << '\n'; + } + catch (const std::exception& e) { std::cerr << "Error: " << e.what() << '\n'; } -- cgit v1.2.3