From: Ludovic R. <lud...@gm...> - 2010-06-06 14:42:12
|
2010/5/29 jean daniel aussel <jda...@gm...>: > just got your mail. > > The error parameter is in the scard wrapper (scard.error). > I think that the issue is that string exceptions are raised. I guess these > strings have to be replaced by objects. Will do it and have another release, I fixed some errors in revision 423 [1]. But I do not know what to do with: hresult = SCardIntroduceReader( hcontext, self.name, self.name ) if 0!=hresult and SCARD_E_DUPLICATE_READER!=hresult: raise error, 'Unable to introduce reader: ' + self.name + ' : ' + SCardGetErrorMessage(hresult) We can create a new exception class IntroduceReaderException() and use it (only in one unique place) or just use BaseSCardException() instead. I propose to use: raise BaseSCardException(hresult) Comments? [1] http://sourceforge.net/mailarchive/message.php?msg_name=E1OLGwm-0006XZ-I9%40sfp-svn-5.v30.ch3.sourceforge.com -- Dr. Ludovic Rousseau |