Catch std::overflow_error exception in Print::run

v0.27.3
Luis Díaz Más 8 years ago
parent d09c4bb7cd
commit 14ff034fb4

@ -232,6 +232,7 @@ namespace Action {
}
int Print::run(const std::string& path)
{
try {
path_ = path;
int rc = 0;
@ -261,7 +262,13 @@ namespace Action {
std::cerr << "Exiv2 exception in print action for file "
<< path << ":\n" << e << "\n";
return 1;
} // Print::run
}
catch(const std::overflow_error& e) {
std::cerr << "std::overflow_error exception in print action for file "
<< path << ":\n" << e.what() << "\n";
return 1;
}
}
int Print::printStructure(std::ostream& out, Exiv2::PrintStructureOption option)
{

Loading…
Cancel
Save