string::size_type pos = sbuf.find(":");
if (pos == string::npos) {
// FIXME poner mejores excepciones.
- throw "Wrong header";
+ throw string("Wrong header: ") + sbuf;
}
h[sbuf.substr(0, pos)] = String(sbuf.substr(pos + 1)).trim();
+#ifdef DEBUG
+ cerr << __FILE__ << " " << sbuf.substr(0, pos) << " = "
+ << h[sbuf.substr(0, pos)] << endl;
+#endif // DEBUG
return is;
}