MXS-2015: Improve CDC connector error messages
The error messages now display the data received so far. This will help resolve at which point the streaming process was when an error occurs.
This commit is contained in:
@ -28,6 +28,7 @@
|
||||
#include <poll.h>
|
||||
#include <sstream>
|
||||
#include <stdexcept>
|
||||
#include <iterator>
|
||||
#include <string.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/types.h>
|
||||
@ -280,6 +281,11 @@ bool Connection::connect(const std::string& table, const std::string& gtid)
|
||||
{
|
||||
rval = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_error += ". Data received so far: ";
|
||||
std::copy(m_buffer.begin(), m_buffer.end(), std::back_inserter(m_error));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user