From fe9bbdf3f5223ee94cb51ba00ddab7f4a6ddb754 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sat, 3 May 2014 15:05:33 +0100 Subject: Use exceptions to hold errors even in the keep_going case. --- tools/dcpdiff.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'tools/dcpdiff.cc') 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 errors; + list > errors; a->read (keep_going, &errors); - for (list::const_iterator i = errors.begin(); i != errors.end(); ++i) { - cerr << *i << "\n"; + for (list >::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 errors; + list > errors; b->read (keep_going, &errors); - for (list::const_iterator i = errors.begin(); i != errors.end(); ++i) { - cerr << *i << "\n"; + for (list >::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"; -- cgit v1.2.3