pearu / pylibnidaqmx

a Python wrapper to libnidaqmx library
Other
10 stars 9 forks source link

enhancement: better error reporting #16

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
(patch attached)

In my nidaqmx wrapper (which is much less capable that this one), I use 
DAQmxGetExtendedErrorInfo if possible, because it provides better info for 
debugging.  So I added that to pylibnidaqmx.  Also, if such an error occurs, it 
raises a custom exception NIDAQmxRuntimeError, which is a subclass of 
RuntimeError.  This shouldn't break existing code that assumes it raises 
RuntimeError (because NIDAQmxRuntimeError is a RuntimeError), but lets callers 
differentiate between a generic RuntimeError and NIDAQmxRuntimeError if they 
desire.

Original issue reported on code.google.com by jpko...@gmail.com on 4 Jan 2012 at 12:05

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks for the patch! It is applied to svn (revision 36)

Original comment by pearu.peterson on 23 Jan 2012 at 8:29