diff transform/CSVFeatureWriter.cpp @ 604:4541581067f3

* Better handling of failed-to-open-output-stream situations; ensure CSV writer closes files when they're finished rather than when it's finished
author Chris Cannam
date Tue, 08 Sep 2009 16:52:36 +0000
parents 6acdddf6f99e
children a41b4e30e3d9
line wrap: on
line diff
--- a/transform/CSVFeatureWriter.cpp	Tue Sep 08 11:27:26 2009 +0000
+++ b/transform/CSVFeatureWriter.cpp	Tue Sep 08 16:52:36 2009 +0000
@@ -79,7 +79,9 @@
     // combination
 
     QTextStream *sptr = getOutputStream(trackId, transform.getIdentifier());
-    if (!sptr) return; //!!! this is probably better handled with an exception
+    if (!sptr) {
+        throw FailedToOpenOutputStream(trackId, transform.getIdentifier());
+    }
 
     QTextStream &stream = *sptr;