1
0
mirror of https://github.com/wjwwood/serial.git synced 2026-01-22 19:54:57 +08:00

convert wstring into string when printing

This commit is contained in:
William Woodall 2013-07-30 11:04:16 -07:00
parent 82884ca519
commit 9d20d1a07f

View File

@ -62,7 +62,8 @@ Serial::SerialImpl::open ()
stringstream ss;
switch (errno_) {
case ERROR_FILE_NOT_FOUND:
ss << "Specified port, " << port_ << ", does not exist.";
// Use this->getPort to convert to a std::string
ss << "Specified port, " << this->getPort() << ", does not exist.";
THROW (IOException, ss.str().c_str());
default:
ss << "Unknown error opening the serial port: " << errno;