diff data/fileio/AudioFileReaderFactory.cpp @ 667:1c8898816fd0

* More useful error message
author Chris Cannam
date Thu, 03 Feb 2011 13:15:07 +0000
parents 5746c559af15
children b4a8d8221eaf
line wrap: on
line diff
--- a/data/fileio/AudioFileReaderFactory.cpp	Mon Oct 25 21:14:40 2010 +0200
+++ b/data/fileio/AudioFileReaderFactory.cpp	Thu Feb 03 13:15:07 2011 +0000
@@ -75,8 +75,13 @@
 
 //    std::cerr << "AudioFileReaderFactory::createReader(\"" << source.getLocation().toStdString() << "\"): Requested rate: " << targetRate << std::endl;
 
-    if (!source.isOK() || !source.isAvailable()) {
-        std::cerr << "AudioFileReaderFactory::createReader(\"" << source.getLocation().toStdString() << "\": Source unavailable" << std::endl;
+    if (!source.isOK()) {
+        std::cerr << "AudioFileReaderFactory::createReader(\"" << source.getLocation().toStdString() << "\": Failed to retrieve source (transmission error?): " << source.getErrorString().toStdString() << std::endl;
+        return 0;
+    }
+
+    if (!source.isAvailable()) {
+        std::cerr << "AudioFileReaderFactory::createReader(\"" << source.getLocation().toStdString() << "\": Source not found" << std::endl;
         return 0;
     }