Skip to content

Commit

Permalink
Log error of exporting map file or tileset file (#4015)
Browse files Browse the repository at this point in the history
  • Loading branch information
snagasawa authored Sep 10, 2024
1 parent 055fb61 commit 694705b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* Scripting: Added `MapEditor.currentBrushChanged` signal
* Scripting: Added `tiled.cursor` to create mouse cursor values
* Fixed crash when accessing a world through a symlink (#4042)
* Fixed error reporting when exporting on the command-line (by Shuhei Nagasawa, #4015)

### Tiled 1.11.0 (27 June 2024)

Expand Down
6 changes: 6 additions & 0 deletions src/tiledapp/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,9 @@ int main(int argc, char *argv[])

if (!success) {
qWarning().noquote() << QCoreApplication::translate("Command line", "Failed to export map to target file.");
errorMsg = outputFormat->errorString();
if (!errorMsg.isEmpty())
qWarning().noquote() << errorMsg;
return 1;
}
return 0;
Expand Down Expand Up @@ -563,6 +566,9 @@ int main(int argc, char *argv[])

if (!success) {
qWarning().noquote() << QCoreApplication::translate("Command line", "Failed to export tileset to target file.");
errorMsg = outputFormat->errorString();
if (!errorMsg.isEmpty())
qWarning().noquote() << errorMsg;
return 1;
}
return 0;
Expand Down

0 comments on commit 694705b

Please sign in to comment.