From 8c76df93e6fe021df6a6aa2b2c710202db326a34 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Sun, 3 Dec 2006 02:22:04 +0000 Subject: * Better error message if the worker doesn't start. --- src/libstore/remote-store.cc | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/libstore/remote-store.cc b/src/libstore/remote-store.cc index 87547ce9125b..f724ac62f715 100644 --- a/src/libstore/remote-store.cc +++ b/src/libstore/remote-store.cc @@ -67,10 +67,14 @@ RemoteStore::RemoteStore() /* Send the magic greeting, check for the reply. */ - writeInt(WORKER_MAGIC_1, to); - - unsigned int magic = readInt(from); - if (magic != WORKER_MAGIC_2) throw Error("protocol mismatch"); + try { + writeInt(WORKER_MAGIC_1, to); + unsigned int magic = readInt(from); + if (magic != WORKER_MAGIC_2) throw Error("protocol mismatch"); + } catch (Error & e) { + throw Error(format("cannot start worker process `%1%' (%2%)") + % worker % e.msg()); + } } -- cgit 1.4.1