diff runner/MIDIFeatureWriter.cpp @ 149:56dcb5f67ed1 jams

Merge from default branch
author Chris Cannam
date Tue, 14 Oct 2014 11:13:43 +0100
parents 3921e0c1f4dd 1a6eab755c81
children db83ea0e102d
line wrap: on
line diff
--- a/runner/MIDIFeatureWriter.cpp	Mon Oct 13 16:58:30 2014 +0100
+++ b/runner/MIDIFeatureWriter.cpp	Tue Oct 14 11:13:43 2014 +0100
@@ -155,7 +155,14 @@
 		     << writer.getError() << endl;
 		throw FileOperationFailed(filename, "create MIDI writer");
 	    }
+
 	    writer.write();
+
+            if (!writer.isOK()) {
+		cerr << "ERROR: Failed to write to MIDI file: " 
+		     << writer.getError() << endl;
+		throw FileOperationFailed(filename, "MIDI write");
+            }
 	}
     }