projects
/
libdcp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use exceptions to hold errors even in the keep_going case.
[libdcp.git]
/
tools
/
dcpdiff.cc
diff --git
a/tools/dcpdiff.cc
b/tools/dcpdiff.cc
index e4225ebcf50d5990311a59710e7dee59cb33659d..666fc1b2c4a15448a8e5a3cc8b6d7b0899e332ef 100644
(file)
--- 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]);
DCP* a = 0;
try {
a = new DCP (argv[optind]);
- list<s
tring
> errors;
+ list<s
hared_ptr<DCPReadError>
> errors;
a->read (keep_going, &errors);
a->read (keep_going, &errors);
- for (list<s
tring
>::const_iterator i = errors.begin(); i != errors.end(); ++i) {
- cerr <<
*i
<< "\n";
+ for (list<s
hared_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";
}
} 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]);
DCP* b = 0;
try {
b = new DCP (argv[optind + 1]);
- list<s
tring
> errors;
+ list<s
hared_ptr<DCPReadError>
> errors;
b->read (keep_going, &errors);
b->read (keep_going, &errors);
- for (list<s
tring
>::const_iterator i = errors.begin(); i != errors.end(); ++i) {
- cerr <<
*i
<< "\n";
+ for (list<s
hared_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";
}
} catch (FileError& e) {
cerr << "Could not read DCP " << argv[optind + 1] << "; " << e.what() << " " << e.filename() << "\n";