mirror of
https://github.com/wjwwood/serial.git
synced 2026-01-23 04:04:54 +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;
|
stringstream ss;
|
||||||
switch (errno_) {
|
switch (errno_) {
|
||||||
case ERROR_FILE_NOT_FOUND:
|
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());
|
THROW (IOException, ss.str().c_str());
|
||||||
default:
|
default:
|
||||||
ss << "Unknown error opening the serial port: " << errno;
|
ss << "Unknown error opening the serial port: " << errno;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user