diff options
Diffstat (limited to 'c/debug.cpp')
-rw-r--r-- | c/debug.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/c/debug.cpp b/c/debug.cpp index 3e20d73..39dfb5d 100644 --- a/c/debug.cpp +++ b/c/debug.cpp @@ -3,6 +3,7 @@ #include <windows.h> #include "debug.h" +#include "err.h" #include "win32.h" struct Avg { @@ -19,17 +20,17 @@ Benchmark::Benchmark(const char* const name, const int id, const int avgmax) { if (!freq) { if (!QueryPerformanceFrequency(&liFreq)) - throw Win32Error(); + throw Err(WINDOWS, L"Tick frequency could not be queried: %s"); freq = liFreq.QuadPart; } LARGE_INTEGER liTicks; if (!QueryPerformanceCounter(&liTicks)) - throw Win32Error(); + throw Err(WINDOWS, L"Ticks could not be retrieved: %s"); ticks = liTicks.QuadPart; } -void Benchmark::Disable() +void Benchmark::Disable() noexcept { disabled = true; } @@ -66,7 +67,7 @@ Benchmark::~Benchmark() } } -const char* WmName(const UINT uMsg) +const char* WmName(const UINT uMsg) noexcept { static const UINT vKey[] = { 0, 1, 2, 3, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, |