diff options
author | Pierre Ossman <ossman@cendio.se> | 2024-09-02 22:58:35 +0200 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2024-11-06 21:06:27 +0100 |
commit | 1d9b2f9984fefbc050c8e3295397ffd280e41788 (patch) | |
tree | c6fa8a4f5e0e6fbc0e165c2bd80b2c81a48bf6bc /unix | |
parent | 5c3588c464520a4757bfc20974090e21af220cdc (diff) | |
download | tigervnc-1d9b2f9984fefbc050c8e3295397ffd280e41788.tar.gz tigervnc-1d9b2f9984fefbc050c8e3295397ffd280e41788.zip |
Use standard exception classes
Use the more specific already included exception classes for common
errors to keep things more understandable.
Diffstat (limited to 'unix')
-rw-r--r-- | unix/tx/TXDialog.h | 2 | ||||
-rw-r--r-- | unix/x0vncserver/XDesktop.cxx | 3 | ||||
-rw-r--r-- | unix/xserver/hw/vnc/vncExtInit.cc | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/unix/tx/TXDialog.h b/unix/tx/TXDialog.h index 3a22fd07..c663ffae 100644 --- a/unix/tx/TXDialog.h +++ b/unix/tx/TXDialog.h @@ -28,6 +28,8 @@ #ifndef __TXDIALOG_H__ #define __TXDIALOG_H__ +#include <rdr/Exception.h> + #include "TXWindow.h" #include <errno.h> diff --git a/unix/x0vncserver/XDesktop.cxx b/unix/x0vncserver/XDesktop.cxx index 9251e371..b4e795ef 100644 --- a/unix/x0vncserver/XDesktop.cxx +++ b/unix/x0vncserver/XDesktop.cxx @@ -31,7 +31,6 @@ #include <network/Socket.h> #include <rfb/LogWriter.h> -#include <rfb/Exception.h> #include <x0vncserver/XDesktop.h> @@ -98,7 +97,7 @@ XDesktop::XDesktop(Display* dpy_, Geometry *geometry_) if (!XkbQueryExtension(dpy, &xkbOpcode, &xkbEventBase, &xkbErrorBase, &major, &minor)) { vlog.error("XKEYBOARD extension not present"); - throw Exception("XKEYBOARD extension not present"); + throw std::runtime_error("XKEYBOARD extension not present"); } XkbSelectEvents(dpy, XkbUseCoreKbd, XkbIndicatorStateNotifyMask, diff --git a/unix/xserver/hw/vnc/vncExtInit.cc b/unix/xserver/hw/vnc/vncExtInit.cc index ab4b28d3..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); |