# # # patch "ChangeLog" # from [dd5e7168804946f27d9e43ca27d3e3f35a3690ea] # to [1dac7009f01cd21ccb4c1fdd694a85f894bbc168] # # patch "cmd_automate.cc" # from [715e703430c1a05f19404fecfad9d37a8db6c47e] # to [eaa1ad0948253c507dfafc1521b8885260ba2db6] # ============================================================ --- ChangeLog dd5e7168804946f27d9e43ca27d3e3f35a3690ea +++ ChangeLog 1dac7009f01cd21ccb4c1fdd694a85f894bbc168 @@ -1,3 +1,8 @@ +2006-11-15 Thomas Keller + + * cmd_automate.cc: defined equal sounding error message + "Bad input to stdio" further + 2006-11-14 Thomas Keller * new automate content_diff command which is basically ============================================================ --- cmd_automate.cc 715e703430c1a05f19404fecfad9d37a8db6c47e +++ cmd_automate.cc eaa1ad0948253c507dfafc1521b8885260ba2db6 @@ -146,7 +146,8 @@ class automate_reader size = (size*10)+(c-'0'); read(&c, 1); } - E(c == ':', F("Bad input to automate stdio")); + E(c == ':', + F("Bad input to automate stdio: expected ':' after string size")); char *str = new char[size]; size_t got = 0; while(got < size) @@ -166,7 +167,7 @@ class automate_reader rv = ::read(0, buf, nbytes); E(rv >= 0, F("read from client failed with error code: %d") % rv); - E(eof_ok || rv > 0, F("Bad input to automate stdio (unexpected EOF)")); + E(eof_ok || rv > 0, F("Bad input to automate stdio: unexpected EOF")); return rv; } void go_to_next_item() @@ -192,7 +193,9 @@ class automate_reader { case 'o': loc = opt; break; case 'l': loc = cmd; break; - default: E(false, F("Bad input to automate stdio")); + default: + E(false, + F("Bad input to automate stdio: unknown start token '%c'") % c); } } public: @@ -214,7 +217,7 @@ public: params.push_back(make_pair(key, val)); go_to_next_item(); } - E(loc == cmd, F("Bad input to automate stdio")); + E(loc == cmd, F("Bad input to automate stdio: expected '%c' token") % cmd); string item; while (get_string(item)) { @@ -337,7 +340,8 @@ AUTOMATE(stdio, "", options::opts::autom utf8 cmd; vector args; vector::iterator i = cmdline.begin(); - E(i != cmdline.end(), F("Bad input to automate stdio")); + E(i != cmdline.end(), + F("Bad input to automate stdio: command name is missing")); cmd = utf8(*i); for (++i; i != cmdline.end(); ++i) {