summaryrefslogtreecommitdiffstats
path: root/device/serial
diff options
context:
space:
mode:
authorreillyg <reillyg@chromium.org>2015-05-20 18:38:43 -0700
committerCommit bot <commit-bot@chromium.org>2015-05-21 01:38:51 +0000
commit114441175e97285f358623c493a39710b9613ff2 (patch)
treeb54cea0f7367b2eef161ac3639b33aa266c96999 /device/serial
parent2338a2e91cf971709acdfb1dedfa70274ab6d867 (diff)
downloadchromium_src-114441175e97285f358623c493a39710b9613ff2.zip
chromium_src-114441175e97285f358623c493a39710b9613ff2.tar.gz
chromium_src-114441175e97285f358623c493a39710b9613ff2.tar.bz2
Log serial read and write errors on Windows.
Log platform errors so that it is possible to determine from logs what caused the chrome.serial API to return the generic "system_error" message. Review URL: https://codereview.chromium.org/1147223002 Cr-Commit-Position: refs/heads/master@{#330870}
Diffstat (limited to 'device/serial')
-rw-r--r--device/serial/serial_io_handler_win.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/device/serial/serial_io_handler_win.cc b/device/serial/serial_io_handler_win.cc
index d6bddb2..60a2a33 100644
--- a/device/serial/serial_io_handler_win.cc
+++ b/device/serial/serial_io_handler_win.cc
@@ -211,6 +211,7 @@ void SerialIoHandlerWin::WriteImpl() {
NULL,
&write_context_->overlapped);
if (!ok && GetLastError() != ERROR_IO_PENDING) {
+ VPLOG(1) << "Write failed";
QueueWriteCompleted(0, serial::SEND_ERROR_SYSTEM_ERROR);
}
}
@@ -301,6 +302,7 @@ void SerialIoHandlerWin::OnIOCompleted(
NULL,
&read_context_->overlapped);
if (!ok && GetLastError() != ERROR_IO_PENDING) {
+ VPLOG(1) << "Read failed";
ReadCompleted(0, serial::RECEIVE_ERROR_SYSTEM_ERROR);
}
}