# HG changeset patch # User Chris Cannam # Date 1412949647 -3600 # Node ID 7a7a46d4bd3c51f1b1fd0a61f16639c22283230f # Parent c24270fc663566c9e6c7964807bd92514db406f8 Fail explicitly if a nonexistent plugin output is requested diff -r c24270fc6635 -r 7a7a46d4bd3c runner/FeatureExtractionManager.cpp --- a/runner/FeatureExtractionManager.cpp Thu Oct 09 13:18:06 2014 +0100 +++ b/runner/FeatureExtractionManager.cpp Fri Oct 10 15:00:47 2014 +0100 @@ -343,6 +343,15 @@ if (transform.getOutput() == "") { transform.setOutput (plugin->getOutputDescriptors()[0].identifier.c_str()); + } else { + if (m_pluginOutputs[plugin].find + (transform.getOutput().toLocal8Bit().data()) == + m_pluginOutputs[plugin].end()) { + cerr << "ERROR: Transform requests nonexistent plugin output \"" + << transform.getOutput() + << "\"" << endl; + return false; + } } m_transformPluginMap[transform] = plugin; @@ -663,8 +672,9 @@ string outputId = transform.getOutput().toStdString(); if (m_pluginOutputs[plugin].find(outputId) == m_pluginOutputs[plugin].end()) { - //!!! throw? - cerr << "WARNING: Nonexistent plugin output \"" << outputId << "\" requested for transform \"" + // We shouldn't actually reach this point: + // addFeatureExtractor tests whether the output exists + cerr << "ERROR: Nonexistent plugin output \"" << outputId << "\" requested for transform \"" << transform.getIdentifier().toStdString() << "\", ignoring this transform" << endl; /*