Mercurial > hg > sonic-annotator
diff runner/main.cpp @ 22:4ab7c925f7ac sonic-annotator-0.3
* fixes to --force option
author | Chris Cannam |
---|---|
date | Tue, 07 Jul 2009 10:50:24 +0000 |
parents | 9a4e410bda7a |
children | 18c42fbc1335 |
line wrap: on
line diff
--- a/runner/main.cpp Tue Jul 07 10:34:27 2009 +0000 +++ b/runner/main.cpp Tue Jul 07 10:50:24 2009 +0000 @@ -725,11 +725,18 @@ std::cerr << "Extracting features for: \"" << i->toStdString() << "\"" << std::endl; try { manager.extractFeatures(*i); - } catch (std::exception e) { + } catch (const std::exception &e) { cerr << "ERROR: Failed to process file \"" << i->toStdString() << "\": " << e.what() << endl; - if (force) continue; - else break; + if (force) { + // print a note only if we have more files to process + QStringList::const_iterator j = i; + if (++j != sources.end()) { + cerr << "NOTE: \"--force\" option was provided, continuing (more errors may occur)" << endl; + } + } else { + break; + } } }