From afa870802ba4296a4ce8c2b9185250f8da1124ca Mon Sep 17 00:00:00 2001 From: Ryan Pavlik Date: Mon, 31 Oct 2011 10:17:59 -0500 Subject: FbTk/App.cc: make startup failure easier to diagnose --- src/FbTk/App.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/FbTk/App.cc b/src/FbTk/App.cc index 8157839..f494a0e 100644 --- a/src/FbTk/App.cc +++ b/src/FbTk/App.cc @@ -60,8 +60,13 @@ App::App(const char *displayname):m_done(false), m_display(0) { if (displayname != 0 && displayname[0] == '\0') displayname = 0; m_display = XOpenDisplay(displayname); - if (!m_display) - throw std::string("Couldn't connect to XServer"); + if (!m_display) { + if (displayname) { + throw std::string("Couldn't connect to XServer") + displayname; + } else { + throw std::string("Couldn't connect to XServer passing null display"); + } + } FbStringUtil::init(); } -- cgit v0.11.2