From 591fd7c6485267a7a248f8f6fc92e82ff53d87bd Mon Sep 17 00:00:00 2001 From: David Rose Date: Tue, 7 Sep 2004 16:46:25 +0000 Subject: [PATCH] use a dialog when the port is unavailable --- pandatool/src/win-stats/winStats.cxx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pandatool/src/win-stats/winStats.cxx b/pandatool/src/win-stats/winStats.cxx index 7c5bc36b58..4e22aefd3a 100644 --- a/pandatool/src/win-stats/winStats.cxx +++ b/pandatool/src/win-stats/winStats.cxx @@ -104,7 +104,14 @@ int main(int argc, char *argv[]) // Create the server object. server = new WinStatsServer; if (!server->listen()) { - nout << "Unable to open port.\n"; + ostringstream stream; + stream + << "Unable to open port " << pstats_port + << ". Try specifying a different\n" + << "port number using pstats-port in your Config file."; + string str = stream.str(); + MessageBox(toplevel_window, str.c_str(), "PStats error", + MB_OK | MB_ICONEXCLAMATION); exit(1); }