Merge tag 'upstream/0.7'
[pysam.git] / pysam / __init__.py
index 8454f8e4b0739581a463484d1799ba2b2a43a1ad..f4f1138d01d537dda24976775aa1c92ed3dd5c2d 100644 (file)
@@ -48,7 +48,7 @@ class SamtoolsDispatcher(object):
         '''execute a samtools command
         '''
         retval, stderr, stdout = csamtools._samtools_dispatch( self.dispatch, args )
-        if retval: raise SamtoolsError( "\n".join( stderr ) )
+        if retval: raise SamtoolsError( 'csamtools returned with error %i: %s' % (retval, "\n".join( stderr ) ))
         self.stderr = stderr
         # samtools commands do not propagate the return code correctly.
         # I have thus added this patch to throw if there is output on stderr.