From 1d9b2f9984fefbc050c8e3295397ffd280e41788 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Mon, 2 Sep 2024 22:58:35 +0200 Subject: Use standard exception classes Use the more specific already included exception classes for common errors to keep things more understandable. --- unix/tx/TXDialog.h | 2 ++ unix/x0vncserver/XDesktop.cxx | 3 +-- unix/xserver/hw/vnc/vncExtInit.cc | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) (limited to 'unix') 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 + #include "TXWindow.h" #include 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 #include -#include #include @@ -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); -- cgit v1.2.3