diff options
Diffstat (limited to 'unix/xserver')
-rw-r--r-- | unix/xserver/hw/vnc/RFBGlue.cc | 2 | ||||
-rw-r--r-- | unix/xserver/hw/vnc/XserverDesktop.cc | 41 | ||||
-rw-r--r-- | unix/xserver/hw/vnc/vncExtInit.cc | 38 |
3 files changed, 40 insertions, 41 deletions
diff --git a/unix/xserver/hw/vnc/RFBGlue.cc b/unix/xserver/hw/vnc/RFBGlue.cc index 2cbee35c..2295bee8 100644 --- a/unix/xserver/hw/vnc/RFBGlue.cc +++ b/unix/xserver/hw/vnc/RFBGlue.cc @@ -216,7 +216,7 @@ int vncIsTCPPortUsed(int port) delete dummy.back(); dummy.pop_back(); } - } catch (rdr::Exception& e) { + } catch (std::exception& e) { return 1; } return 0; diff --git a/unix/xserver/hw/vnc/XserverDesktop.cc b/unix/xserver/hw/vnc/XserverDesktop.cc index e3bc57d8..9c4486c8 100644 --- a/unix/xserver/hw/vnc/XserverDesktop.cc +++ b/unix/xserver/hw/vnc/XserverDesktop.cc @@ -38,7 +38,6 @@ #include <sys/utsname.h> #include <network/Socket.h> -#include <rfb/Exception.h> #include <rfb/VNCServerST.h> #include <rfb/LogWriter.h> #include <rfb/Configuration.h> @@ -195,8 +194,8 @@ void XserverDesktop::requestClipboard() { try { server->requestClipboard(); - } catch (rdr::Exception& e) { - vlog.error("XserverDesktop::requestClipboard: %s",e.str()); + } catch (std::exception& e) { + vlog.error("XserverDesktop::requestClipboard: %s",e.what()); } } @@ -204,8 +203,8 @@ void XserverDesktop::announceClipboard(bool available) { try { server->announceClipboard(available); - } catch (rdr::Exception& e) { - vlog.error("XserverDesktop::announceClipboard: %s",e.str()); + } catch (std::exception& e) { + vlog.error("XserverDesktop::announceClipboard: %s",e.what()); } } @@ -213,8 +212,8 @@ void XserverDesktop::sendClipboardData(const char* data_) { try { server->sendClipboardData(data_); - } catch (rdr::Exception& e) { - vlog.error("XserverDesktop::sendClipboardData: %s",e.str()); + } catch (std::exception& e) { + vlog.error("XserverDesktop::sendClipboardData: %s",e.what()); } } @@ -232,8 +231,8 @@ void XserverDesktop::setDesktopName(const char* name) { try { server->setName(name); - } catch (rdr::Exception& e) { - vlog.error("XserverDesktop::setDesktopName: %s",e.str()); + } catch (std::exception& e) { + vlog.error("XserverDesktop::setDesktopName: %s",e.what()); } } @@ -267,8 +266,8 @@ void XserverDesktop::setCursor(int width, int height, int hotX, int hotY, try { server->setCursor(width, height, Point(hotX, hotY), cursorData); - } catch (rdr::Exception& e) { - vlog.error("XserverDesktop::setCursor: %s",e.str()); + } catch (std::exception& e) { + vlog.error("XserverDesktop::setCursor: %s",e.what()); } delete [] cursorData; @@ -278,8 +277,8 @@ void XserverDesktop::setCursorPos(int x, int y, bool warped) { try { server->setCursorPos(Point(x, y), warped); - } catch (rdr::Exception& e) { - vlog.error("XserverDesktop::setCursorPos: %s",e.str()); + } catch (std::exception& e) { + vlog.error("XserverDesktop::setCursorPos: %s",e.what()); } } @@ -287,8 +286,8 @@ void XserverDesktop::add_changed(const rfb::Region ®ion) { try { server->add_changed(region); - } catch (rdr::Exception& e) { - vlog.error("XserverDesktop::add_changed: %s",e.str()); + } catch (std::exception& e) { + vlog.error("XserverDesktop::add_changed: %s",e.what()); } } @@ -296,8 +295,8 @@ void XserverDesktop::add_copied(const rfb::Region &dest, const rfb::Point &delta { try { server->add_copied(dest, delta); - } catch (rdr::Exception& e) { - vlog.error("XserverDesktop::add_copied: %s",e.str()); + } catch (std::exception& e) { + vlog.error("XserverDesktop::add_copied: %s",e.what()); } } @@ -313,8 +312,8 @@ void XserverDesktop::handleSocketEvent(int fd, bool read, bool write) return; vlog.error("Cannot find file descriptor for socket event"); - } catch (rdr::Exception& e) { - vlog.error("XserverDesktop::handleSocketEvent: %s",e.str()); + } catch (std::exception& e) { + vlog.error("XserverDesktop::handleSocketEvent: %s",e.what()); } } @@ -406,8 +405,8 @@ void XserverDesktop::blockHandler(int* timeout) int nextTimeout = Timer::checkTimeouts(); if (nextTimeout >= 0 && (*timeout == -1 || nextTimeout < *timeout)) *timeout = nextTimeout; - } catch (rdr::Exception& e) { - vlog.error("XserverDesktop::blockHandler: %s",e.str()); + } catch (std::exception& e) { + vlog.error("XserverDesktop::blockHandler: %s", e.what()); } } diff --git a/unix/xserver/hw/vnc/vncExtInit.cc b/unix/xserver/hw/vnc/vncExtInit.cc index 073b07e2..e56e0db0 100644 --- a/unix/xserver/hw/vnc/vncExtInit.cc +++ b/unix/xserver/hw/vnc/vncExtInit.cc @@ -250,7 +250,7 @@ void vncExtensionInit(void) } if (!inetd && listeners.empty()) - throw rdr::Exception("No path or port configured for incoming connections"); + throw std::runtime_error("No path or port configured for incoming connections"); PixelFormat pf = vncGetPixelFormat(scr); @@ -274,8 +274,8 @@ void vncExtensionInit(void) vncHooksInit(scr); } - } catch (rdr::Exception& e) { - vncFatalError("vncExtInit: %s\n",e.str()); + } catch (std::exception& e) { + vncFatalError("vncExtInit: %s\n",e.what()); } vncRegisterBlockHandlers(); @@ -288,8 +288,8 @@ void vncExtensionClose(void) delete desktop[scr]; desktop[scr] = nullptr; } - } catch (rdr::Exception& e) { - vncFatalError("vncExtInit: %s\n",e.str()); + } catch (std::exception& e) { + vncFatalError("vncExtInit: %s\n",e.what()); } } @@ -348,8 +348,8 @@ int vncConnectClient(const char *addr, int viewOnly) if (strlen(addr) == 0) { try { desktop[0]->disconnectClients(); - } catch (rdr::Exception& e) { - vlog.error("Disconnecting all clients: %s",e.str()); + } catch (std::exception& e) { + vlog.error("Disconnecting all clients: %s", e.what()); return -1; } return 0; @@ -365,8 +365,8 @@ int vncConnectClient(const char *addr, int viewOnly) vlog.info("Reverse connection: %s:%d%s", host.c_str(), port, viewOnly ? " (view only)" : ""); desktop[0]->addClient(sock, true, (bool)viewOnly); - } catch (rdr::Exception& e) { - vlog.error("Reverse connection: %s",e.str()); + } catch (std::exception& e) { + vlog.error("Reverse connection: %s", e.what()); return -1; } @@ -462,8 +462,8 @@ void vncPostScreenResize(int scrIdx, int success, int width, int height) desktop[scrIdx]->setFramebuffer(width, height, vncFbptr[scrIdx], vncFbstride[scrIdx]); - } catch (rdr::Exception& e) { - vncFatalError("vncPostScreenResize: %s\n", e.str()); + } catch (std::exception& e) { + vncFatalError("vncPostScreenResize: %s\n", e.what()); } } @@ -479,8 +479,8 @@ void vncRefreshScreenLayout(int scrIdx) { try { desktop[scrIdx]->refreshScreenLayout(); - } catch (rdr::Exception& e) { - vncFatalError("vncRefreshScreenLayout: %s\n", e.str()); + } catch (std::exception& e) { + vncFatalError("vncRefreshScreenLayout: %s\n", e.what()); } } @@ -488,8 +488,8 @@ uint64_t vncGetMsc(int scrIdx) { try { return desktop[scrIdx]->getMsc(); - } catch (rdr::Exception& e) { - vncFatalError("vncGetMsc: %s\n", e.str()); + } catch (std::exception& e) { + vncFatalError("vncGetMsc: %s\n", e.what()); } } @@ -497,8 +497,8 @@ void vncQueueMsc(int scrIdx, uint64_t id, uint64_t msc) { try { desktop[scrIdx]->queueMsc(id, msc); - } catch (rdr::Exception& e) { - vncFatalError("vncQueueMsc: %s\n", e.str()); + } catch (std::exception& e) { + vncFatalError("vncQueueMsc: %s\n", e.what()); } } @@ -506,8 +506,8 @@ void vncAbortMsc(int scrIdx, uint64_t id) { try { desktop[scrIdx]->abortMsc(id); - } catch (rdr::Exception& e) { - vncFatalError("vncAbortMsc: %s\n", e.str()); + } catch (std::exception& e) { + vncFatalError("vncAbortMsc: %s\n", e.what()); } } |