diff options
author | reillyg <reillyg@chromium.org> | 2015-05-20 18:38:43 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-05-21 01:38:51 +0000 |
commit | 114441175e97285f358623c493a39710b9613ff2 (patch) | |
tree | b54cea0f7367b2eef161ac3639b33aa266c96999 /device/serial | |
parent | 2338a2e91cf971709acdfb1dedfa70274ab6d867 (diff) | |
download | chromium_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.cc | 2 |
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); } } |