- } catch (string e) {
- cerr << " (" << __LINE__ << ") Error: " << e << endl;
- stop = true;
- continue;
- } catch (...) {
- cerr << " (" << __LINE__ << ") Error desconocido!" << endl;
- stop = true;
+ // Si hay un error al parsear el comando, se envia una respuesta con el
+ // error.
+ } catch (const HTTPError& e) {
+#ifdef DEBUG
+ cerr << __FILE__ << " : real_run() ERROR: status_code = "
+ << e.code << " | reason = " << HTTPMessage::reason(e.code)
+ << " | desc = " << e.what() << endl;
+#endif // DEBUG
+ //Glib::Mutex::Lock lock(socket_mutex);
+ socket << HTTPResponse(e) << flush;