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:
parent
82884ca519
commit
9d20d1a07f
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user