FbTk/App.cc: make startup failure easier to diagnose
Ryan Pavlik rpavlik@iastate.edu
1 files changed,
7 insertions(+),
2 deletions(-)
jump to
M
src/FbTk/App.cc
→
src/FbTk/App.cc
@@ -60,8 +60,13 @@ // a blank string, rather than a null string, so we make them equivalent
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(); }