aboutsummaryrefslogtreecommitdiffstats
path: root/vncviewer
diff options
context:
space:
mode:
Diffstat (limited to 'vncviewer')
-rw-r--r--vncviewer/CConn.cxx14
-rw-r--r--vncviewer/ServerDialog.cxx20
-rw-r--r--vncviewer/Viewport.cxx14
-rw-r--r--vncviewer/parameters.cxx14
-rw-r--r--vncviewer/touch.cxx4
-rw-r--r--vncviewer/vncviewer.cxx16
6 files changed, 41 insertions, 41 deletions
diff --git a/vncviewer/CConn.cxx b/vncviewer/CConn.cxx
index 81bea534..57904b64 100644
--- a/vncviewer/CConn.cxx
+++ b/vncviewer/CConn.cxx
@@ -108,9 +108,9 @@ CConn::CConn(const char* vncServerName, network::Socket* socket=nullptr)
serverHost.c_str(), serverPort);
}
} catch (rdr::Exception& e) {
- vlog.error("%s", e.str());
+ vlog.error("%s", e.what());
abort_connection(_("Failed to connect to \"%s\":\n\n%s"),
- vncServerName, e.str());
+ vncServerName, e.what());
return;
}
}
@@ -262,7 +262,7 @@ void CConn::socketEvent(FL_SOCKET fd, void *data)
cc->getOutStream()->cork(false);
} catch (rdr::EndOfStream& e) {
- vlog.info("%s", e.str());
+ vlog.info("%s", e.what());
if (!cc->desktop) {
vlog.error(_("The connection was dropped by the server before "
"the session could be established."));
@@ -272,15 +272,15 @@ void CConn::socketEvent(FL_SOCKET fd, void *data)
disconnect();
}
} catch (rfb::AuthCancelledException& e) {
- vlog.info("%s", e.str());
+ vlog.info("%s", e.what());
disconnect();
} catch (rfb::AuthFailureException& e) {
cc->resetPassword();
- vlog.error(_("Authentication failed: %s"), e.str());
+ vlog.error(_("Authentication failed: %s"), e.what());
abort_connection(_("Failed to authenticate with the server. Reason "
- "given by the server:\n\n%s"), e.str());
+ "given by the server:\n\n%s"), e.what());
} catch (rdr::Exception& e) {
- vlog.error("%s", e.str());
+ vlog.error("%s", e.what());
abort_connection_with_unexpected_error(e);
}
diff --git a/vncviewer/ServerDialog.cxx b/vncviewer/ServerDialog.cxx
index 7b334bca..a1f4d23c 100644
--- a/vncviewer/ServerDialog.cxx
+++ b/vncviewer/ServerDialog.cxx
@@ -141,9 +141,9 @@ void ServerDialog::run(const char* servername, char *newservername)
fltk_menu_add(dialog.serverName->menubutton(),
entry.c_str(), 0, nullptr);
} catch (Exception& e) {
- vlog.error("%s", e.str());
+ vlog.error("%s", e.what());
fl_alert(_("Unable to load the server history:\n\n%s"),
- e.str());
+ e.what());
}
while (dialog.shown()) Fl::wait();
@@ -193,9 +193,9 @@ void ServerDialog::handleLoad(Fl_Widget* /*widget*/, void* data)
try {
dialog->serverName->value(loadViewerParameters(filename));
} catch (Exception& e) {
- vlog.error("%s", e.str());
+ vlog.error("%s", e.what());
fl_alert(_("Unable to load the specified configuration file:\n\n%s"),
- e.str());
+ e.what());
}
delete(file_chooser);
@@ -254,9 +254,9 @@ void ServerDialog::handleSaveAs(Fl_Widget* /*widget*/, void* data)
try {
saveViewerParameters(filename, servername);
} catch (Exception& e) {
- vlog.error("%s", e.str());
+ vlog.error("%s", e.what());
fl_alert(_("Unable to save the specified configuration "
- "file:\n\n%s"), e.str());
+ "file:\n\n%s"), e.what());
}
delete(file_chooser);
@@ -288,9 +288,9 @@ void ServerDialog::handleConnect(Fl_Widget* /*widget*/, void *data)
try {
saveViewerParameters(nullptr, servername);
} catch (Exception& e) {
- vlog.error("%s", e.str());
+ vlog.error("%s", e.what());
fl_alert(_("Unable to save the default configuration:\n\n%s"),
- e.str());
+ e.what());
}
// avoid duplicates in the history
@@ -300,9 +300,9 @@ void ServerDialog::handleConnect(Fl_Widget* /*widget*/, void *data)
try {
dialog->saveServerHistory();
} catch (Exception& e) {
- vlog.error("%s", e.str());
+ vlog.error("%s", e.what());
fl_alert(_("Unable to save the server history:\n\n%s"),
- e.str());
+ e.what());
}
}
diff --git a/vncviewer/Viewport.cxx b/vncviewer/Viewport.cxx
index e29c877c..5163535d 100644
--- a/vncviewer/Viewport.cxx
+++ b/vncviewer/Viewport.cxx
@@ -576,7 +576,7 @@ int Viewport::handle(int event)
try {
cc->sendClipboardData(filtered.c_str());
} catch (rdr::Exception& e) {
- vlog.error("%s", e.str());
+ vlog.error("%s", e.what());
abort_connection_with_unexpected_error(e);
}
@@ -669,7 +669,7 @@ void Viewport::sendPointerEvent(const rfb::Point& pos, uint8_t buttonMask)
try {
cc->writer()->writePointerEvent(pos, buttonMask);
} catch (rdr::Exception& e) {
- vlog.error("%s", e.str());
+ vlog.error("%s", e.what());
abort_connection_with_unexpected_error(e);
}
} else {
@@ -776,7 +776,7 @@ void Viewport::handleClipboardChange(int source, void *data)
try {
self->cc->announceClipboard(true);
} catch (rdr::Exception& e) {
- vlog.error("%s", e.str());
+ vlog.error("%s", e.what());
abort_connection_with_unexpected_error(e);
}
}
@@ -789,7 +789,7 @@ void Viewport::flushPendingClipboard()
try {
cc->announceClipboard(true);
} catch (rdr::Exception& e) {
- vlog.error("%s", e.str());
+ vlog.error("%s", e.what());
abort_connection_with_unexpected_error(e);
}
}
@@ -814,7 +814,7 @@ void Viewport::handlePointerTimeout(void *data)
self->cc->writer()->writePointerEvent(self->lastPointerPos,
self->lastButtonMask);
} catch (rdr::Exception& e) {
- vlog.error("%s", e.str());
+ vlog.error("%s", e.what());
abort_connection_with_unexpected_error(e);
}
}
@@ -886,7 +886,7 @@ void Viewport::handleKeyPress(int keyCode, uint32_t keySym)
else
cc->writer()->writeKeyEvent(keySym, keyCode, true);
} catch (rdr::Exception& e) {
- vlog.error("%s", e.str());
+ vlog.error("%s", e.what());
abort_connection_with_unexpected_error(e);
}
}
@@ -916,7 +916,7 @@ void Viewport::handleKeyRelease(int keyCode)
else
cc->writer()->writeKeyEvent(iter->second, keyCode, false);
} catch (rdr::Exception& e) {
- vlog.error("%s", e.str());
+ vlog.error("%s", e.what());
abort_connection_with_unexpected_error(e);
}
diff --git a/vncviewer/parameters.cxx b/vncviewer/parameters.cxx
index 2beae930..1eac8f9d 100644
--- a/vncviewer/parameters.cxx
+++ b/vncviewer/parameters.cxx
@@ -466,7 +466,7 @@ static void saveToReg(const char* servername) {
} catch (Exception& e) {
RegCloseKey(hKey);
throw Exception(format(_("Failed to save \"%s\": %s"),
- "ServerName", e.str()));
+ "ServerName", e.what()));
}
for (size_t i = 0; i < sizeof(parameterArray)/sizeof(VoidParameter*); i++) {
@@ -483,7 +483,7 @@ static void saveToReg(const char* servername) {
} catch (Exception& e) {
RegCloseKey(hKey);
throw Exception(format(_("Failed to save \"%s\": %s"),
- parameterArray[i]->getName(), e.str()));
+ parameterArray[i]->getName(), e.what()));
}
}
@@ -497,7 +497,7 @@ static void saveToReg(const char* servername) {
RegCloseKey(hKey);
throw Exception(format(_("Failed to remove \"%s\": %s"),
readOnlyParameterArray[i]->getName(),
- e.str()));
+ e.what()));
}
}
@@ -537,7 +537,7 @@ list<string> loadHistoryFromRegKey() {
} catch (Exception& e) {
// Just ignore this entry and try the next one
vlog.error(_("Failed to read server history entry %d: %s"),
- (int)index, e.str());
+ (int)index, e.what());
continue;
}
@@ -575,7 +575,7 @@ static void getParametersFromReg(VoidParameter* parameters[],
} catch(Exception& e) {
// Just ignore this entry and continue with the rest
vlog.error(_("Failed to read parameter \"%s\": %s"),
- parameters[i]->getName(), e.str());
+ parameters[i]->getName(), e.what());
}
}
}
@@ -605,7 +605,7 @@ static char* loadFromReg() {
snprintf(servername, buffersize, "%s", servernameBuffer);
} catch(Exception& e) {
vlog.error(_("Failed to read parameter \"%s\": %s"),
- "ServerName", e.str());
+ "ServerName", e.what());
strcpy(servername, "");
}
@@ -838,7 +838,7 @@ char* loadViewerParameters(const char *filename) {
} catch(Exception& e) {
// Just ignore this entry and continue with the rest
vlog.error(_("Failed to read line %d in file %s: %s"),
- lineNr, filepath, e.str());
+ lineNr, filepath, e.what());
continue;
}
diff --git a/vncviewer/touch.cxx b/vncviewer/touch.cxx
index 1efd3e46..0b2e4bc6 100644
--- a/vncviewer/touch.cxx
+++ b/vncviewer/touch.cxx
@@ -181,8 +181,8 @@ static int handleTouchEvent(void *event, void* /*data*/)
try {
handlers[msg->hwnd] = new Win32TouchHandler(msg->hwnd);
} catch (rfb::Exception& e) {
- vlog.error(_("Failed to create touch handler: %s"), e.str());
- abort_vncviewer(_("Failed to create touch handler: %s"), e.str());
+ vlog.error(_("Failed to create touch handler: %s"), e.what());
+ abort_vncviewer(_("Failed to create touch handler: %s"), e.what());
}
// Add a special hook-in for handling events sent directly to WndProc
if (!SetWindowSubclass(msg->hwnd, &win32WindowProc, 1, 0)) {
diff --git a/vncviewer/vncviewer.cxx b/vncviewer/vncviewer.cxx
index a1d9b39d..6a063382 100644
--- a/vncviewer/vncviewer.cxx
+++ b/vncviewer/vncviewer.cxx
@@ -157,7 +157,7 @@ void abort_connection(const char *error, ...)
void abort_connection_with_unexpected_error(const rdr::Exception &e) {
abort_connection(_("An unexpected error occurred when communicating "
- "with the server:\n\n%s"), e.str());
+ "with the server:\n\n%s"), e.what());
}
void disconnect()
@@ -514,9 +514,9 @@ potentiallyLoadConfigurationFile(const char *filename)
strncpy(vncServerName, newServerName, VNCSERVERNAMELEN-1);
vncServerName[VNCSERVERNAMELEN-1] = '\0';
} catch (rfb::Exception& e) {
- vlog.error("%s", e.str());
+ vlog.error("%s", e.what());
abort_vncviewer(_("Unable to load the specified configuration "
- "file:\n\n%s"), e.str());
+ "file:\n\n%s"), e.what());
}
}
}
@@ -672,7 +672,7 @@ int main(int argc, char** argv)
defaultServerName[VNCSERVERNAMELEN-1] = '\0';
}
} catch (rfb::Exception& e) {
- vlog.error("%s", e.str());
+ vlog.error("%s", e.what());
}
for (int i = 1; i < argc;) {
@@ -787,8 +787,8 @@ int main(int argc, char** argv)
}
}
} catch (rdr::Exception& e) {
- vlog.error("%s", e.str());
- abort_vncviewer(_("Failure waiting for incoming VNC connection:\n\n%s"), e.str());
+ vlog.error("%s", e.what());
+ abort_vncviewer(_("Failure waiting for incoming VNC connection:\n\n%s"), e.what());
return 1; /* Not reached */
}
@@ -808,8 +808,8 @@ int main(int argc, char** argv)
try {
mktunnel();
} catch (rdr::Exception& e) {
- vlog.error("%s", e.str());
- abort_vncviewer(_("Failure setting up encrypted tunnel:\n\n%s"), e.str());
+ vlog.error("%s", e.what());
+ abort_vncviewer(_("Failure setting up encrypted tunnel:\n\n%s"), e.what());
}
}
#endif