diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-11-06 16:43:01 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-11-06 16:43:01 +0000 |
| commit | 59602b67d0637817a156b7bd0fc05f96fe41dee5 (patch) | |
| tree | 3214f9f260796cf673c8bc69b069fd63b8a0889c /src/tools/dcpomatic_server_cli.cc | |
| parent | 4c7416beb0efbf74868f756ddf8013f93c5841dc (diff) | |
Various bits of server tidying up.
Diffstat (limited to 'src/tools/dcpomatic_server_cli.cc')
| -rw-r--r-- | src/tools/dcpomatic_server_cli.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/tools/dcpomatic_server_cli.cc b/src/tools/dcpomatic_server_cli.cc index e9540ff70..1ec985b4b 100644 --- a/src/tools/dcpomatic_server_cli.cc +++ b/src/tools/dcpomatic_server_cli.cc @@ -98,6 +98,14 @@ main (int argc, char* argv[]) Scaler::setup_scalers (); shared_ptr<FileLog> log (new FileLog ("dcpomatic_server_cli.log")); Server server (log, verbose); - server.run (num_threads); + try { + server.run (num_threads); + } catch (boost::system::system_error e) { + if (e.code() == boost::system::errc::address_in_use) { + cerr << argv[0] << ": address already in use. Is another DCP-o-matic server instance already running?\n"; + exit (EXIT_FAILURE); + } + cerr << argv[0] << ": " << e.what() << "\n"; + } return 0; } |
