Convert Exiv2::ErrorCode into an enum class

This commit is contained in:
Luis Díaz Más
2022-03-08 19:35:16 +01:00
committed by Luis Diaz
parent 5d08bb9bec
commit 96f7f2e4c5
80 changed files with 955 additions and 949 deletions
+6 -6
View File
@@ -72,7 +72,7 @@ bool processLine(const std::string& line, int num, IptcData &iptcData)
default:
std::ostringstream os;
os << "Unknown command (" << line.at(0) << ") at line " << num;
throw Error(kerErrorMessage, os.str());
throw Error(ErrorCode::kerErrorMessage, os.str());
}
return true;
}
@@ -88,7 +88,7 @@ void processAdd(const std::string& line, int num, IptcData &iptcData)
dataStart == std::string::npos) {
std::ostringstream os;
os << "Invalid \'a\' command at line " << num;
throw Error(kerErrorMessage, os.str());
throw Error(ErrorCode::kerErrorMessage, os.str());
}
std::string key(line.substr(keyStart, keyEnd-keyStart));
@@ -105,7 +105,7 @@ void processAdd(const std::string& line, int num, IptcData &iptcData)
int rc = iptcData.add(iptcKey, value.get());
if (rc) {
throw Error(kerErrorMessage, "Iptc dataset already exists and is not repeatable");
throw Error(ErrorCode::kerErrorMessage, "Iptc dataset already exists and is not repeatable");
}
}
@@ -116,7 +116,7 @@ void processRemove(const std::string& line, int num, IptcData &iptcData)
if (keyStart == std::string::npos) {
std::ostringstream os;
os << "Invalid \'r\' command at line " << num;
throw Error(kerErrorMessage, os.str());
throw Error(ErrorCode::kerErrorMessage, os.str());
}
const std::string key( line.substr(keyStart) );
@@ -139,7 +139,7 @@ void processModify(const std::string& line, int num, IptcData &iptcData)
dataStart == std::string::npos) {
std::ostringstream os;
os << "Invalid \'m\' command at line " << num;
throw Error(kerErrorMessage, os.str());
throw Error(ErrorCode::kerErrorMessage, os.str());
}
std::string key(line.substr(keyStart, keyEnd-keyStart));
@@ -161,7 +161,7 @@ void processModify(const std::string& line, int num, IptcData &iptcData)
else {
int rc = iptcData.add(iptcKey, value.get());
if (rc) {
throw Error(kerErrorMessage, "Iptc dataset already exists and is not repeatable");
throw Error(ErrorCode::kerErrorMessage, "Iptc dataset already exists and is not repeatable");
}
}
}