summaryrefslogtreecommitdiff
path: root/tools/dcpdiff.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-05-03 15:05:33 +0100
committerCarl Hetherington <cth@carlh.net>2014-05-03 15:05:33 +0100
commitfe9bbdf3f5223ee94cb51ba00ddab7f4a6ddb754 (patch)
tree1d7ff4b95d3a65989c3cb136ae338e59ca5251b1 /tools/dcpdiff.cc
parent9f5a1507380c52338765477da7cbe378b68870d9 (diff)
Use exceptions to hold errors even in the keep_going case.
Diffstat (limited to 'tools/dcpdiff.cc')
-rw-r--r--tools/dcpdiff.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/dcpdiff.cc b/tools/dcpdiff.cc
index e4225ebc..666fc1b2 100644
--- a/tools/dcpdiff.cc
+++ b/tools/dcpdiff.cc
@@ -105,10 +105,10 @@ main (int argc, char* argv[])
DCP* a = 0;
try {
a = new DCP (argv[optind]);
- list<string> errors;
+ list<shared_ptr<DCPReadError> > errors;
a->read (keep_going, &errors);
- for (list<string>::const_iterator i = errors.begin(); i != errors.end(); ++i) {
- cerr << *i << "\n";
+ for (list<shared_ptr<DCPReadError> >::const_iterator i = errors.begin(); i != errors.end(); ++i) {
+ cerr << (*i)->what() << "\n";
}
} catch (FileError& e) {
cerr << "Could not read DCP " << argv[optind] << "; " << e.what() << " " << e.filename() << "\n";
@@ -118,10 +118,10 @@ main (int argc, char* argv[])
DCP* b = 0;
try {
b = new DCP (argv[optind + 1]);
- list<string> errors;
+ list<shared_ptr<DCPReadError> > errors;
b->read (keep_going, &errors);
- for (list<string>::const_iterator i = errors.begin(); i != errors.end(); ++i) {
- cerr << *i << "\n";
+ for (list<shared_ptr<DCPReadError> >::const_iterator i = errors.begin(); i != errors.end(); ++i) {
+ cerr << (*i)->what() << "\n";
}
} catch (FileError& e) {
cerr << "Could not read DCP " << argv[optind + 1] << "; " << e.what() << " " << e.filename() << "\n";