Mercurial > hg > sonic-annotator
comparison 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 |
comparison
equal
deleted
inserted
replaced
21:9a4e410bda7a | 22:4ab7c925f7ac |
---|---|
723 for (QStringList::const_iterator i = sources.begin(); | 723 for (QStringList::const_iterator i = sources.begin(); |
724 i != sources.end(); ++i) { | 724 i != sources.end(); ++i) { |
725 std::cerr << "Extracting features for: \"" << i->toStdString() << "\"" << std::endl; | 725 std::cerr << "Extracting features for: \"" << i->toStdString() << "\"" << std::endl; |
726 try { | 726 try { |
727 manager.extractFeatures(*i); | 727 manager.extractFeatures(*i); |
728 } catch (std::exception e) { | 728 } catch (const std::exception &e) { |
729 cerr << "ERROR: Failed to process file \"" << i->toStdString() | 729 cerr << "ERROR: Failed to process file \"" << i->toStdString() |
730 << "\": " << e.what() << endl; | 730 << "\": " << e.what() << endl; |
731 if (force) continue; | 731 if (force) { |
732 else break; | 732 // print a note only if we have more files to process |
733 QStringList::const_iterator j = i; | |
734 if (++j != sources.end()) { | |
735 cerr << "NOTE: \"--force\" option was provided, continuing (more errors may occur)" << endl; | |
736 } | |
737 } else { | |
738 break; | |
739 } | |
733 } | 740 } |
734 } | 741 } |
735 | 742 |
736 for (int i = 0; i < writers.size(); ++i) delete writers[i]; | 743 for (int i = 0; i < writers.size(); ++i) delete writers[i]; |
737 | 744 |