diff options
author | Ryan Pavlik <rpavlik@iastate.edu> | 2011-10-31 15:17:59 (GMT) |
---|---|---|
committer | Ryan Pavlik <rpavlik@iastate.edu> | 2011-10-31 15:51:51 (GMT) |
commit | afa870802ba4296a4ce8c2b9185250f8da1124ca (patch) | |
tree | ebc9e37277da53daa465c55ad05a16cd9547b17a | |
parent | d5b58a8033233743b2ff1a6e88eb2d75b54c66ec (diff) | |
download | fluxbox-afa870802ba4296a4ce8c2b9185250f8da1124ca.zip fluxbox-afa870802ba4296a4ce8c2b9185250f8da1124ca.tar.bz2 |
FbTk/App.cc: make startup failure easier to diagnose
-rw-r--r-- | src/FbTk/App.cc | 9 |
1 files 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) { | |||
60 | if (displayname != 0 && displayname[0] == '\0') | 60 | if (displayname != 0 && displayname[0] == '\0') |
61 | displayname = 0; | 61 | displayname = 0; |
62 | m_display = XOpenDisplay(displayname); | 62 | m_display = XOpenDisplay(displayname); |
63 | if (!m_display) | 63 | if (!m_display) { |
64 | throw std::string("Couldn't connect to XServer"); | 64 | if (displayname) { |
65 | throw std::string("Couldn't connect to XServer") + displayname; | ||
66 | } else { | ||
67 | throw std::string("Couldn't connect to XServer passing null display"); | ||
68 | } | ||
69 | } | ||
65 | 70 | ||
66 | FbStringUtil::init(); | 71 | FbStringUtil::init(); |
67 | } | 72 | } |