diff options
| author | Carl Hetherington <cth@carlh.net> | 2012-10-25 18:12:04 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2012-10-25 18:12:04 +0100 |
| commit | 5030281871bbb53092c2c8c0b6905818783acf01 (patch) | |
| tree | f805c271a52ecf4d55ba57d57dc22d057034c91d /src/lib/server.cc | |
| parent | d3bc1936a6e2d12a585ca5a984d8b98dba501fe9 (diff) | |
Slightly more detailed logging in server.
Diffstat (limited to 'src/lib/server.cc')
| -rw-r--r-- | src/lib/server.cc | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/lib/server.cc b/src/lib/server.cc index c80527567..0bf42bcb9 100644 --- a/src/lib/server.cc +++ b/src/lib/server.cc @@ -40,7 +40,6 @@ using std::string; using std::stringstream; using std::multimap; using std::vector; -using std::cerr; using boost::shared_ptr; using boost::algorithm::is_any_of; using boost::algorithm::split; @@ -131,7 +130,15 @@ Server::process (shared_ptr<Socket> socket) ); shared_ptr<EncodedData> encoded = dcp_video_frame.encode_locally (); - encoded->send (socket); + try { + encoded->send (socket); + } catch (std::exception& e) { + _log->log (String::compose ( + "Send failed; pixel format %1, size %2x%3, %4 components", + image->pixel_format(), image->size().width, image->size().height, image->components() + ) + ); + } return frame; } @@ -158,7 +165,7 @@ Server::worker_thread () try { frame = process (socket); } catch (std::exception& e) { - cerr << "Error: " << e.what() << "\n"; + _log->log (String::compose ("Error: %1", e.what())); } socket.reset (); |
