From 9680a556c35ade1421022f834fd25d1f38dfc2cf Mon Sep 17 00:00:00 2001 From: Chris Frey Date: Wed, 4 Mar 2009 20:39:30 -0500 Subject: [PATCH] Fixed embarrassing incorrect exception messages in usbwrap.cc Fortunately, these didn't affect my timeout testing. --- ChangeLog | 3 +++ src/usbwrap.cc | 16 ++++++++-------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index cdadf732..79b7d4ac 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ Release: version 0.15 - 2009/01/?? ------------------------------------------------------------------------------ +2009/03/04 + - fixed embarrassing incorrect exception messages in usbwrap.cc + Fortunately, these didn't affect my timeout testing. 2009/03/03 - applied Nicolas Vivien's opensync-0.4x API patch 2009/02/28 diff --git a/src/usbwrap.cc b/src/usbwrap.cc index fa40fb41..6edfaac9 100644 --- a/src/usbwrap.cc +++ b/src/usbwrap.cc @@ -229,9 +229,9 @@ bool Device::BulkWrite(int ep, const Barry::Data &data, int timeout) if( ret < 0 && ret != -EINTR && ret != -EAGAIN ) { m_lasterror = ret; if( ret == -ETIMEDOUT ) - throw Timeout(ret, "Timeout in usb_bulk_write"); + throw Timeout(ret, "Timeout in usb_bulk_write (1)"); else - throw Error(ret, "Error in usb_bulk_write"); + throw Error(ret, "Error in usb_bulk_write (1)"); } } while( ret == -EINTR || ret == -EAGAIN ); @@ -253,9 +253,9 @@ bool Device::BulkWrite(int ep, const void *data, size_t size, int timeout) if( ret < 0 && ret != -EINTR && ret != -EAGAIN ) { m_lasterror = ret; if( ret == -ETIMEDOUT ) - throw Timeout(ret, "Timeout in usb_bulk_read"); + throw Timeout(ret, "Timeout in usb_bulk_write (2)"); else - throw Error(ret, "Error in usb_bulk_read"); + throw Error(ret, "Error in usb_bulk_write (2)"); } } while( ret == -EINTR || ret == -EAGAIN ); @@ -272,9 +272,9 @@ bool Device::InterruptRead(int ep, Barry::Data &data, int timeout) if( ret < 0 && ret != -EINTR && ret != -EAGAIN ) { m_lasterror = ret; if( ret == -ETIMEDOUT ) - throw Timeout(ret, "Timeout in usb_bulk_read"); + throw Timeout(ret, "Timeout in usb_interrupt_read"); else - throw Error(ret, "Error in usb_bulk_read"); + throw Error(ret, "Error in usb_interrupt_read"); } data.ReleaseBuffer(ret); } while( ret == -EINTR || ret == -EAGAIN ); @@ -294,9 +294,9 @@ bool Device::InterruptWrite(int ep, const Barry::Data &data, int timeout) if( ret < 0 && ret != -EINTR && ret != -EAGAIN ) { m_lasterror = ret; if( ret == -ETIMEDOUT ) - throw Timeout(ret, "Timeout in usb_bulk_read"); + throw Timeout(ret, "Timeout in usb_interrupt_write"); else - throw Error(ret, "Error in usb_bulk_read"); + throw Error(ret, "Error in usb_interrupt_write"); } } while( ret == -EINTR || ret == -EAGAIN ); -- 2.11.4.GIT