aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2024-11-22 17:03:40 +0100
committerPierre Ossman <ossman@cendio.se>2024-11-22 17:03:40 +0100
commit44f67714bc53f33764da26d007b5dc4e8045473c (patch)
treed4f53e73219ee6593570ba626096551e6be48b1a
parent213c12c4f12101b560d532416788914b9f67399a (diff)
downloadtigervnc-44f67714bc53f33764da26d007b5dc4e8045473c.tar.gz
tigervnc-44f67714bc53f33764da26d007b5dc4e8045473c.zip
Capitalize even more logging and exceptions
-rw-r--r--unix/vncconfig/vncconfig.cxx14
-rw-r--r--unix/vncpasswd/vncpasswd.cxx2
-rw-r--r--unix/x0vncserver/x0vncserver.cxx6
-rw-r--r--unix/xserver/hw/vnc/vncExtInit.cc6
-rw-r--r--unix/xserver/hw/vnc/vncHooks.c4
-rw-r--r--unix/xserver/hw/vnc/xvnc.c4
-rw-r--r--vncviewer/vncviewer.cxx2
-rw-r--r--win/rfb_win32/CleanDesktop.cxx2
-rw-r--r--win/rfb_win32/Clipboard.cxx6
-rw-r--r--win/rfb_win32/DIBSectionBuffer.cxx4
-rw-r--r--win/rfb_win32/DeviceContext.cxx10
-rw-r--r--win/rfb_win32/DeviceFrameBuffer.cxx12
-rw-r--r--win/rfb_win32/Dialog.cxx8
-rw-r--r--win/rfb_win32/LaunchProcess.cxx4
-rw-r--r--win/rfb_win32/MonitorInfo.cxx6
-rw-r--r--win/rfb_win32/MsgWindow.cxx4
-rw-r--r--win/rfb_win32/Registry.cxx8
-rw-r--r--win/rfb_win32/SDisplay.cxx4
-rw-r--r--win/rfb_win32/SDisplayCoreWMHooks.cxx2
-rw-r--r--win/rfb_win32/Security.cxx4
-rw-r--r--win/rfb_win32/WMPoller.cxx2
21 files changed, 57 insertions, 57 deletions
diff --git a/unix/vncconfig/vncconfig.cxx b/unix/vncconfig/vncconfig.cxx
index d74d18a6..bacbfb3f 100644
--- a/unix/vncconfig/vncconfig.cxx
+++ b/unix/vncconfig/vncconfig.cxx
@@ -175,7 +175,7 @@ private:
static void usage()
{
- fprintf(stderr,"usage: %s [parameters]\n",
+ fprintf(stderr,"Usage: %s [parameters]\n",
programName);
fprintf(stderr," %s [parameters] -connect "
"[-view-only] <host>[:<port>]\n", programName);
@@ -248,11 +248,11 @@ int main(int argc, char** argv)
}
if (i >= argc) usage();
if (!XVncExtConnect(dpy, argv[i], viewOnly)) {
- fprintf(stderr,"connecting to %s failed\n",argv[i]);
+ fprintf(stderr, "Connecting to %s failed\n",argv[i]);
}
} else if (strcmp(argv[i], "-disconnect") == 0) {
if (!XVncExtConnect(dpy, "", False)) {
- fprintf(stderr,"disconnecting all clients failed\n");
+ fprintf(stderr, "Disconnecting all clients failed\n");
}
} else if (strcmp(argv[i], "-get") == 0) {
i++;
@@ -262,7 +262,7 @@ int main(int argc, char** argv)
if (XVncExtGetParam(dpy, argv[i], &data, &len)) {
printf("%.*s\n",len,data);
} else {
- fprintf(stderr,"getting param %s failed\n",argv[i]);
+ fprintf(stderr, "Getting param %s failed\n",argv[i]);
}
XFree(data);
} else if (strcmp(argv[i], "-desc") == 0) {
@@ -272,7 +272,7 @@ int main(int argc, char** argv)
if (desc) {
printf("%s\n",desc);
} else {
- fprintf(stderr,"getting description for param %s failed\n",argv[i]);
+ fprintf(stderr, "Getting description for param %s failed\n",argv[i]);
}
XFree(desc);
} else if (strcmp(argv[i], "-list") == 0) {
@@ -286,10 +286,10 @@ int main(int argc, char** argv)
i++;
if (i >= argc) usage();
if (!XVncExtSetParam(dpy, argv[i])) {
- fprintf(stderr,"setting param %s failed\n",argv[i]);
+ fprintf(stderr, "Setting param %s failed\n",argv[i]);
}
} else if (XVncExtSetParam(dpy, argv[i])) {
- fprintf(stderr,"set parameter %s\n",argv[i]);
+ fprintf(stderr, "Set parameter %s\n",argv[i]);
} else {
usage();
}
diff --git a/unix/vncpasswd/vncpasswd.cxx b/unix/vncpasswd/vncpasswd.cxx
index 9833ec7b..368bd40a 100644
--- a/unix/vncpasswd/vncpasswd.cxx
+++ b/unix/vncpasswd/vncpasswd.cxx
@@ -47,7 +47,7 @@ char* prog;
static void usage()
{
- fprintf(stderr,"usage: %s [file]\n", prog);
+ fprintf(stderr,"Usage: %s [file]\n", prog);
fprintf(stderr," %s -f\n", prog);
exit(1);
}
diff --git a/unix/x0vncserver/x0vncserver.cxx b/unix/x0vncserver/x0vncserver.cxx
index f67bdcc9..7ea427ed 100644
--- a/unix/x0vncserver/x0vncserver.cxx
+++ b/unix/x0vncserver/x0vncserver.cxx
@@ -76,7 +76,7 @@ BoolParameter localhostOnly("localhost",
"Only allow connections from localhost",
false);
StringParameter interface("interface",
- "listen on the specified network address",
+ "Listen on the specified network address",
"all");
static const char* defaultDesktopName()
@@ -169,7 +169,7 @@ public:
bool verifyConnection(Socket* s) override
{
if (!reloadRules()) {
- vlog.error("Could not read IP filtering rules: rejecting all clients");
+ vlog.error("Could not read IP filtering rules, rejecting all clients");
filter.clear();
filter.push_back(parsePattern("-"));
return false;
@@ -310,7 +310,7 @@ int main(int argc, char** argv)
if (!(dpy = XOpenDisplay(displayname))) {
// FIXME: Why not vlog.error(...)?
- fprintf(stderr,"%s: unable to open display \"%s\"\r\n",
+ fprintf(stderr,"%s: Unable to open display \"%s\"\r\n",
programName, XDisplayName(displayname));
exit(1);
}
diff --git a/unix/xserver/hw/vnc/vncExtInit.cc b/unix/xserver/hw/vnc/vncExtInit.cc
index 9b8cfe5b..367481ac 100644
--- a/unix/xserver/hw/vnc/vncExtInit.cc
+++ b/unix/xserver/hw/vnc/vncExtInit.cc
@@ -89,7 +89,7 @@ rfb::BoolParameter localhostOnly("localhost",
"Only allow connections from localhost",
false);
rfb::StringParameter interface("interface",
- "listen on the specified network address",
+ "Listen on the specified network address",
"all");
rfb::BoolParameter avoidShiftNumLock("AvoidShiftNumLock",
"Avoid fake Shift presses for keys affected by NumLock.",
@@ -173,13 +173,13 @@ static void parseOverrideList(const char *text, ParamSet &out)
void vncExtensionInit(void)
{
if (vncExtGeneration == vncGetServerGeneration()) {
- vlog.error("vncExtensionInit: called twice in same generation?");
+ vlog.error("vncExtensionInit: Called twice in same generation?");
return;
}
vncExtGeneration = vncGetServerGeneration();
if (vncGetScreenCount() > MAXSCREENS)
- vncFatalError("vncExtensionInit: too many screens\n");
+ vncFatalError("vncExtensionInit: Too many screens\n");
vncAddExtension();
diff --git a/unix/xserver/hw/vnc/vncHooks.c b/unix/xserver/hw/vnc/vncHooks.c
index 7fe35ada..bb15591f 100644
--- a/unix/xserver/hw/vnc/vncHooks.c
+++ b/unix/xserver/hw/vnc/vncHooks.c
@@ -436,7 +436,7 @@ static Bool vncHooksCloseScreen(ScreenPtr pScreen_)
unwrap(vncHooksScreen, rp, rrCrtcSet);
}
- DBGPRINT((stderr,"vncHooksCloseScreen: unwrapped screen functions\n"));
+ DBGPRINT((stderr,"vncHooksCloseScreen: Unwrapped screen functions\n"));
return (*pScreen->CloseScreen)(pScreen);
}
@@ -1214,7 +1214,7 @@ static void vncHooksValidateGC(GCPtr pGC, unsigned long changes,
(*pGC->funcs->ValidateGC) (pGC, changes, pDrawable);
if (is_visible(pDrawable)) {
pGCPriv->ops = pGC->ops;
- DBGPRINT((stderr,"vncHooksValidateGC: wrapped GC ops\n"));
+ DBGPRINT((stderr,"vncHooksValidateGC: Wrapped GC ops\n"));
} else {
pGCPriv->ops = NULL;
}
diff --git a/unix/xserver/hw/vnc/xvnc.c b/unix/xserver/hw/vnc/xvnc.c
index 0165d598..31301f6c 100644
--- a/unix/xserver/hw/vnc/xvnc.c
+++ b/unix/xserver/hw/vnc/xvnc.c
@@ -374,7 +374,7 @@ ddxProcessArgument(int argc, char *argv[], int i)
if ((vncInetdSock = dup(0)) == -1)
FatalError
- ("Xvnc error: failed to allocate a new file descriptor for -inetd: %s\n", strerror(errno));
+ ("Xvnc error: Failed to allocate a new file descriptor for -inetd: %s\n", strerror(errno));
/* Avoid xserver >= 1.19's epoll-fd becoming fd 2 / stderr only to be
@@ -396,7 +396,7 @@ ddxProcessArgument(int argc, char *argv[], int i)
if (displayNum == 100)
FatalError
- ("Xvnc error: no free display number for -inetd\n");
+ ("Xvnc error: No free display number for -inetd\n");
}
display = displayNumStr;
diff --git a/vncviewer/vncviewer.cxx b/vncviewer/vncviewer.cxx
index 5e2692e8..4efe6e93 100644
--- a/vncviewer/vncviewer.cxx
+++ b/vncviewer/vncviewer.cxx
@@ -448,7 +448,7 @@ static void usage(const char *programName)
fprintf(stderr,
"\n"
- "usage: %s [parameters] [host][:displayNum]\n"
+ "Usage: %s [parameters] [host][:displayNum]\n"
" %s [parameters] [host][::port]\n"
#ifndef WIN32
" %s [parameters] [unix socket]\n"
diff --git a/win/rfb_win32/CleanDesktop.cxx b/win/rfb_win32/CleanDesktop.cxx
index 710c10f5..9713b2cd 100644
--- a/win/rfb_win32/CleanDesktop.cxx
+++ b/win/rfb_win32/CleanDesktop.cxx
@@ -45,7 +45,7 @@ struct ActiveDesktop {
HRESULT result = CoCreateInstance(CLSID_ActiveDesktop, nullptr, CLSCTX_INPROC_SERVER,
IID_IActiveDesktop, (PVOID*)&handle);
if (result != S_OK)
- throw rdr::win32_error("failed to contact Active Desktop", HRESULT_CODE(result));
+ throw rdr::win32_error("Failed to contact Active Desktop", HRESULT_CODE(result));
}
~ActiveDesktop() {
if (handle)
diff --git a/win/rfb_win32/Clipboard.cxx b/win/rfb_win32/Clipboard.cxx
index 2a2be1d5..8fdc79c8 100644
--- a/win/rfb_win32/Clipboard.cxx
+++ b/win/rfb_win32/Clipboard.cxx
@@ -129,7 +129,7 @@ Clipboard::setClipText(const char* text) {
// - Firstly, we must open the clipboard
if (!OpenClipboard(getHandle()))
- throw rdr::win32_error("unable to open Win32 clipboard", GetLastError());
+ throw rdr::win32_error("Unable to open Win32 clipboard", GetLastError());
// - Convert the supplied clipboard text into UTF-16 format with CRLF
std::string filtered(convertCRLF(text));
@@ -144,11 +144,11 @@ Clipboard::setClipText(const char* text) {
// - Next, we must clear out any existing data
if (!EmptyClipboard())
- throw rdr::win32_error("unable to empty Win32 clipboard", GetLastError());
+ throw rdr::win32_error("Unable to empty Win32 clipboard", GetLastError());
// - Set the new clipboard data
if (!SetClipboardData(CF_UNICODETEXT, clip_handle))
- throw rdr::win32_error("unable to set Win32 clipboard", GetLastError());
+ throw rdr::win32_error("Unable to set Win32 clipboard", GetLastError());
clip_handle = nullptr;
vlog.debug("Set clipboard");
diff --git a/win/rfb_win32/DIBSectionBuffer.cxx b/win/rfb_win32/DIBSectionBuffer.cxx
index e2cb15c1..3ce99809 100644
--- a/win/rfb_win32/DIBSectionBuffer.cxx
+++ b/win/rfb_win32/DIBSectionBuffer.cxx
@@ -58,7 +58,7 @@ void DIBSectionBuffer::initBuffer(const PixelFormat& pf, int w, int h) {
uint8_t* new_data = nullptr;
if (!pf.trueColour)
- throw std::invalid_argument("palette format not supported");
+ throw std::invalid_argument("Palette format not supported");
format = pf;
@@ -87,7 +87,7 @@ void DIBSectionBuffer::initBuffer(const PixelFormat& pf, int w, int h) {
if (!new_bitmap) {
int err = GetLastError();
- throw rdr::win32_error("unable to create DIB section", err);
+ throw rdr::win32_error("Unable to create DIB section", err);
}
vlog.debug("recreateBuffer()");
diff --git a/win/rfb_win32/DeviceContext.cxx b/win/rfb_win32/DeviceContext.cxx
index 353ee716..092279fb 100644
--- a/win/rfb_win32/DeviceContext.cxx
+++ b/win/rfb_win32/DeviceContext.cxx
@@ -51,10 +51,10 @@ PixelFormat DeviceContext::getPF(HDC dc) {
bi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
bi.bmiHeader.biBitCount = 0;
if (!::GetDIBits(dc, bitmap, 0, 1, nullptr, (BITMAPINFO*)&bi, DIB_RGB_COLORS)) {
- throw rdr::win32_error("unable to determine device pixel format", GetLastError());
+ throw rdr::win32_error("Unable to determine device pixel format", GetLastError());
}
if (!::GetDIBits(dc, bitmap, 0, 1, nullptr, (BITMAPINFO*)&bi, DIB_RGB_COLORS)) {
- throw rdr::win32_error("unable to determine pixel shifts/palette", GetLastError());
+ throw rdr::win32_error("Unable to determine pixel shifts/palette", GetLastError());
}
// Set the initial format information
@@ -87,7 +87,7 @@ PixelFormat DeviceContext::getPF(HDC dc) {
break;
default:
vlog.error("Bits per pixel %u not supported", bi.bmiHeader.biBitCount);
- throw std::invalid_argument("unknown bits per pixel specified");
+ throw std::invalid_argument("Unknown bits per pixel specified");
};
break;
case BI_BITFIELDS:
@@ -115,7 +115,7 @@ PixelFormat DeviceContext::getPF(HDC dc) {
// Check that the depth & bpp are valid
if (depth > bpp) {
- vlog.error("depth exceeds bits per pixel!");
+ vlog.error("Depth exceeds bits per pixel!");
bpp = depth;
}
@@ -159,7 +159,7 @@ Rect DeviceContext::getClipBox(HDC dc) {
DeviceDC::DeviceDC(const char* deviceName) {
dc = ::CreateDC("DISPLAY", deviceName, nullptr, nullptr);
if (!dc)
- throw rdr::win32_error("failed to create DeviceDC", GetLastError());
+ throw rdr::win32_error("Failed to create DeviceDC", GetLastError());
}
DeviceDC::~DeviceDC() {
diff --git a/win/rfb_win32/DeviceFrameBuffer.cxx b/win/rfb_win32/DeviceFrameBuffer.cxx
index 6e38d6a8..9d215041 100644
--- a/win/rfb_win32/DeviceFrameBuffer.cxx
+++ b/win/rfb_win32/DeviceFrameBuffer.cxx
@@ -54,14 +54,14 @@ DeviceFrameBuffer::DeviceFrameBuffer(HDC deviceContext, const Rect& wRect)
int capabilities = GetDeviceCaps(device, RASTERCAPS);
if (!(capabilities & RC_BITBLT)) {
- throw std::invalid_argument("device does not support BitBlt");
+ throw std::invalid_argument("Device does not support BitBlt");
}
if (!(capabilities & RC_DI_BITMAP)) {
- throw std::invalid_argument("device does not support GetDIBits");
+ throw std::invalid_argument("Device does not support GetDIBits");
}
/*
if (GetDeviceCaps(device, PLANES) != 1) {
- throw std::invalid_argument("device does not support planar displays");
+ throw std::invalid_argument("Device does not support planar displays");
}
*/
@@ -140,9 +140,9 @@ void DeviceFrameBuffer::setCursor(HCURSOR hCursor, VNCServer* server)
if (!GetObject(iconInfo.hbmMask, sizeof(BITMAP), &maskInfo))
throw rdr::win32_error("GetObject() failed", GetLastError());
if (maskInfo.bmPlanes != 1)
- throw std::invalid_argument("unsupported multi-plane cursor");
+ throw std::invalid_argument("Unsupported multi-plane cursor");
if (maskInfo.bmBitsPixel != 1)
- throw std::invalid_argument("unsupported cursor mask format");
+ throw std::invalid_argument("Unsupported cursor mask format");
width = maskInfo.bmWidth;
height = maskInfo.bmHeight;
@@ -188,7 +188,7 @@ void DeviceFrameBuffer::setCursor(HCURSOR hCursor, VNCServer* server)
if ((bi.bV5RedMask != ((unsigned)0xff << ridx*8)) ||
(bi.bV5GreenMask != ((unsigned)0xff << gidx*8)) ||
(bi.bV5BlueMask != ((unsigned)0xff << bidx*8)))
- throw std::invalid_argument("unsupported cursor colour format");
+ throw std::invalid_argument("Unsupported cursor colour format");
uint8_t* rwbuffer = buffer.data();
for (int y = 0; y < height; y++) {
diff --git a/win/rfb_win32/Dialog.cxx b/win/rfb_win32/Dialog.cxx
index f147df45..cf8b2475 100644
--- a/win/rfb_win32/Dialog.cxx
+++ b/win/rfb_win32/Dialog.cxx
@@ -78,7 +78,7 @@ int Dialog::getItemInt(int id) {
BOOL trans;
int result = GetDlgItemInt(handle, id, &trans, TRUE);
if (!trans)
- throw std::runtime_error("unable to read dialog Int");
+ throw std::runtime_error("Unable to read dialog Int");
return result;
}
const char* Dialog::getItemString(int id) {
@@ -277,12 +277,12 @@ bool PropSheet::showPropSheet(HWND owner_, bool showApply, bool showCtxtHelp, bo
if ((handle == nullptr) || (handle == (HWND)-1))
throw rdr::win32_error("PropertySheet failed", GetLastError());
centerWindow(handle, owner_);
- plog.info("created %p", handle);
+ plog.info("Created %p", handle);
(void)capture;
#ifdef _DIALOG_CAPTURE
if (capture) {
- plog.info("capturing \"%s\"", title.c_str());
+ plog.info("Capturing \"%s\"", title.c_str());
char* tmpdir = getenv("TEMP");
HDC dc = GetWindowDC(handle);
DeviceFrameBuffer fb(dc);
@@ -335,7 +335,7 @@ bool PropSheet::showPropSheet(HWND owner_, bool showApply, bool showCtxtHelp, bo
}
#endif
- plog.info("finished %p", handle);
+ plog.info("Finished %p", handle);
DestroyWindow(handle);
handle = nullptr;
diff --git a/win/rfb_win32/LaunchProcess.cxx b/win/rfb_win32/LaunchProcess.cxx
index 38aa720f..93bd21fe 100644
--- a/win/rfb_win32/LaunchProcess.cxx
+++ b/win/rfb_win32/LaunchProcess.cxx
@@ -53,7 +53,7 @@ void LaunchProcess::start(HANDLE userToken, bool createConsole) {
char buf[256];
HDESK desktop = GetThreadDesktop(GetCurrentThreadId());
if (!GetUserObjectInformation(desktop, UOI_NAME, buf, 256, &size))
- throw rdr::win32_error("unable to launch process", GetLastError());
+ throw rdr::win32_error("Unable to launch process", GetLastError());
snprintf(desktopName, 256, "WinSta0\\%s", buf);
@@ -95,7 +95,7 @@ void LaunchProcess::start(HANDLE userToken, bool createConsole) {
flags, nullptr, nullptr,
&sinfo, &procInfo);
if (!success)
- throw rdr::win32_error("unable to launch process", GetLastError());
+ throw rdr::win32_error("Unable to launch process", GetLastError());
// Wait for it to finish initialising
WaitForInputIdle(procInfo.hProcess, 15000);
diff --git a/win/rfb_win32/MonitorInfo.cxx b/win/rfb_win32/MonitorInfo.cxx
index 9f7c2daf..5d715ef6 100644
--- a/win/rfb_win32/MonitorInfo.cxx
+++ b/win/rfb_win32/MonitorInfo.cxx
@@ -44,7 +44,7 @@ static void fillMonitorInfo(HMONITOR monitor, MONITORINFOEXA* mi) {
memset(mi, 0, sizeof(MONITORINFOEXA));
mi->cbSize = sizeof(MONITORINFOEXA);
if (!GetMonitorInfo(monitor, mi))
- throw rdr::win32_error("failed to GetMonitorInfo", GetLastError());
+ throw rdr::win32_error("Failed to GetMonitorInfo", GetLastError());
vlog.debug("Monitor is %ld,%ld-%ld,%ld", mi->rcMonitor.left, mi->rcMonitor.top, mi->rcMonitor.right, mi->rcMonitor.bottom);
vlog.debug("Work area is %ld,%ld-%ld,%ld", mi->rcWork.left, mi->rcWork.top, mi->rcWork.right, mi->rcWork.bottom);
vlog.debug("Device is \"%s\"", mi->szDevice);
@@ -57,7 +57,7 @@ MonitorInfo::MonitorInfo(HWND window) {
HMONITOR monitor = MonitorFromWindow(window, MONITOR_DEFAULTTONEAREST);
if (!monitor)
- throw rdr::win32_error("failed to get monitor", GetLastError());
+ throw rdr::win32_error("Failed to get monitor", GetLastError());
fillMonitorInfo(monitor, this);
}
@@ -67,7 +67,7 @@ MonitorInfo::MonitorInfo(const RECT& r) {
HMONITOR monitor = MonitorFromRect(&r, MONITOR_DEFAULTTONEAREST);
if (!monitor)
- throw rdr::win32_error("failed to get monitor", GetLastError());
+ throw rdr::win32_error("Failed to get monitor", GetLastError());
fillMonitorInfo(monitor, this);
}
diff --git a/win/rfb_win32/MsgWindow.cxx b/win/rfb_win32/MsgWindow.cxx
index bd35ca0f..c89db851 100644
--- a/win/rfb_win32/MsgWindow.cxx
+++ b/win/rfb_win32/MsgWindow.cxx
@@ -82,7 +82,7 @@ MsgWindowClass::MsgWindowClass() : classAtom(0) {
wndClass.lpszClassName = "rfb::win32::MsgWindowClass";
classAtom = RegisterClass(&wndClass);
if (!classAtom) {
- throw rdr::win32_error("unable to register MsgWindow window class", GetLastError());
+ throw rdr::win32_error("Unable to register MsgWindow window class", GetLastError());
}
}
@@ -104,7 +104,7 @@ MsgWindow::MsgWindow(const char* name_) : name(name_), handle(nullptr) {
name.c_str(), WS_OVERLAPPED, 0, 0, 10, 10,
nullptr, nullptr, baseClass.instance, this);
if (!handle) {
- throw rdr::win32_error("unable to create WMNotifier window instance", GetLastError());
+ throw rdr::win32_error("Unable to create WMNotifier window instance", GetLastError());
}
vlog.debug("Created window \"%s\" (%p)", name.c_str(), handle);
}
diff --git a/win/rfb_win32/Registry.cxx b/win/rfb_win32/Registry.cxx
index 27e55a2e..d40c9016 100644
--- a/win/rfb_win32/Registry.cxx
+++ b/win/rfb_win32/Registry.cxx
@@ -214,11 +214,11 @@ std::string RegKey::getRepresentation(const char* valname) const {
DWORD type, length;
LONG result = RegQueryValueEx(key, valname, nullptr, &type, nullptr, &length);
if (result != ERROR_SUCCESS)
- throw rdr::win32_error("get registry value length", result);
+ throw rdr::win32_error("Get registry value length", result);
std::vector<uint8_t> data(length);
result = RegQueryValueEx(key, valname, nullptr, &type, (BYTE*)data.data(), &length);
if (result != ERROR_SUCCESS)
- throw rdr::win32_error("get registry value", result);
+ throw rdr::win32_error("Get registry value", result);
switch (type) {
case REG_BINARY:
@@ -247,14 +247,14 @@ std::string RegKey::getRepresentation(const char* valname) const {
std::vector<char> expanded(required);
length = ExpandEnvironmentStrings(str.c_str(), expanded.data(), required);
if (required<length)
- throw std::runtime_error("unable to expand environment strings");
+ throw std::runtime_error("Unable to expand environment strings");
return expanded.data();
} else {
return "";
}
}
default:
- throw std::logic_error("unsupported registry type");
+ throw std::logic_error("Unsupported registry type");
}
}
diff --git a/win/rfb_win32/SDisplay.cxx b/win/rfb_win32/SDisplay.cxx
index ee339649..b930328f 100644
--- a/win/rfb_win32/SDisplay.cxx
+++ b/win/rfb_win32/SDisplay.cxx
@@ -176,7 +176,7 @@ void SDisplay::startCore() {
// Switch to the current input desktop
if (rfb::win32::desktopChangeRequired()) {
if (!rfb::win32::changeDesktop())
- throw std::runtime_error("unable to switch into input desktop");
+ throw std::runtime_error("Unable to switch into input desktop");
}
// Initialise the change tracker and clipper
@@ -199,7 +199,7 @@ void SDisplay::startCore() {
} catch (std::exception& e) {
delete core; core = nullptr;
if (tryMethod == 0)
- throw std::runtime_error("unable to access desktop");
+ throw std::runtime_error("Unable to access desktop");
tryMethod--;
vlog.error("%s", e.what());
}
diff --git a/win/rfb_win32/SDisplayCoreWMHooks.cxx b/win/rfb_win32/SDisplayCoreWMHooks.cxx
index 4c307600..056ff4cb 100644
--- a/win/rfb_win32/SDisplayCoreWMHooks.cxx
+++ b/win/rfb_win32/SDisplayCoreWMHooks.cxx
@@ -40,7 +40,7 @@ SDisplayCoreWMHooks::SDisplayCoreWMHooks(SDisplay* d, UpdateTracker* ut)
consolePollTimer(getHandle(), consolePollTimerId),
pollConsoles(false) {
if (!hooks.setEvent(display->getUpdateEvent()))
- throw std::runtime_error("hook subsystem failed to initialise");
+ throw std::runtime_error("Hook subsystem failed to initialise");
poller.setUpdateTracker(updateTracker);
cursorTimer.start(20);
consolePollTimer.start(200);
diff --git a/win/rfb_win32/Security.cxx b/win/rfb_win32/Security.cxx
index 9f970aeb..8f000e1b 100644
--- a/win/rfb_win32/Security.cxx
+++ b/win/rfb_win32/Security.cxx
@@ -96,7 +96,7 @@ void AccessEntries::addEntry(const PSID sid,
PSID Sid::copySID(const PSID sid) {
if (!IsValidSid(sid))
- throw std::invalid_argument("invalid SID in copyPSID");
+ throw std::invalid_argument("Invalid SID in copyPSID");
PSID buf = (PSID)new uint8_t[GetLengthSid(sid)];
if (!CopySid(GetLengthSid(sid), buf, sid))
throw rdr::win32_error("CopySid failed", GetLastError());
@@ -105,7 +105,7 @@ PSID Sid::copySID(const PSID sid) {
void Sid::setSID(const PSID sid) {
if (!IsValidSid(sid))
- throw std::invalid_argument("invalid SID in copyPSID");
+ throw std::invalid_argument("Invalid SID in copyPSID");
resize(GetLengthSid(sid));
if (!CopySid(GetLengthSid(sid), data(), sid))
throw rdr::win32_error("CopySid failed", GetLastError());
diff --git a/win/rfb_win32/WMPoller.cxx b/win/rfb_win32/WMPoller.cxx
index 98e8dce3..e2ff0ac6 100644
--- a/win/rfb_win32/WMPoller.cxx
+++ b/win/rfb_win32/WMPoller.cxx
@@ -58,7 +58,7 @@ bool
rfb::win32::WMPoller::checkPollWindow(HWND w) {
char buffer[128];
if (!GetClassName(w, buffer, 128))
- throw rdr::win32_error("unable to get window class:%u", GetLastError());
+ throw rdr::win32_error("Unable to get window class:%u", GetLastError());
if ((strcmp(buffer, "tty") != 0) &&
(strcmp(buffer, "ConsoleWindowClass") != 0)) {
return false;