Skip to content

Commit

Permalink
Add error logging to appicontool
Browse files Browse the repository at this point in the history
  • Loading branch information
vicr123 committed Mar 22, 2024
1 parent 90271b3 commit 31e892c
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions cntp-appicontool/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,19 @@ int main(int argc, char* argv[]) {

QString overlayIcon, overlayIconMac;
QFile baseIconFile(parser.value("overlay-icon"));
baseIconFile.open(QFile::ReadOnly);
if (!baseIconFile.open(QFile::ReadOnly)) {
eoutput << "error: " << parser.value("overlay-icon") << ": " << baseIconFile.errorString() << "\n";
return 1;
}
overlayIcon = baseIconFile.readAll();
baseIconFile.close();

if (parser.isSet("overlay-icon-mac")) {
QFile baseIconFile(parser.value("overlay-icon-mac"));
baseIconFile.open(QFile::ReadOnly);
if (!baseIconFile.open(QFile::ReadOnly)) {
eoutput << "error: " << parser.value("overlay-icon-mac") << ": " << baseIconFile.errorString() << "\n";
return 1;
}
overlayIconMac = baseIconFile.readAll();
baseIconFile.close();
}
Expand Down

0 comments on commit 31e892c

Please sign in to comment.