X-Git-Url: https://main.carlh.net/gitweb/?p=dcpomatic.git;a=blobdiff_plain;f=src%2Ftools%2Fdcpomatic_server_cli.cc;h=fa13ebb5fb8770fae62d16ccb898cebfa00da282;hp=8f343b344ff2fb7b45c6d40b956fde682dc1aa0c;hb=3828baf56467224f5d44049bf1e7a7ed11f43a05;hpb=17df947ac256397311a11894062070f8069c7e75 diff --git a/src/tools/dcpomatic_server_cli.cc b/src/tools/dcpomatic_server_cli.cc index 8f343b344..fa13ebb5f 100644 --- a/src/tools/dcpomatic_server_cli.cc +++ b/src/tools/dcpomatic_server_cli.cc @@ -1,19 +1,20 @@ /* Copyright (C) 2012-2015 Carl Hetherington - This program is free software; you can redistribute it and/or modify + This file is part of DCP-o-matic. + + DCP-o-matic is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + DCP-o-matic is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + along with DCP-o-matic. If not, see . */ @@ -110,16 +111,18 @@ main (int argc, char* argv[]) log.reset (new NullLog); } - EncodeServer server (log, verbose); + EncodeServer server (log, verbose, num_threads); try { - server.run (num_threads); + server.run (); } 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"; + } catch (std::exception& e) { + cerr << argv[0] << ": failed to start server; " << e.what() << "\n"; } return 0; }