summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-02-22 12:06:40 +0100
committerGitHub <noreply@github.com>2019-02-22 12:06:40 +0100
commit2985eabc7fa86fd61eb3b570a7597721e91dfae4 (patch)
treef82e1543c3fabd33b08b5d20566bf34cb192379f /editor
parent5f5f338e3f9754a8ea5f176eefc55df3e0a34dd8 (diff)
parent793ffd942ece6fee0b4005cab4f5aa193a4cea11 (diff)
Merge pull request #26150 from akien-mga/export-error-message
Improve error message on project export failure
Diffstat (limited to 'editor')
-rw-r--r--editor/project_export.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/editor/project_export.cpp b/editor/project_export.cpp
index ec64d76b18..831ebde3a6 100644
--- a/editor/project_export.cpp
+++ b/editor/project_export.cpp
@@ -972,10 +972,15 @@ void ProjectExportDialog::_export_project_to_path(const String &p_path) {
Error err = platform->export_project(current, export_debug->is_pressed(), p_path, 0);
if (err != OK) {
- error_dialog->set_text(TTR("Export templates for this platform are missing/corrupted:") + " " + platform->get_name());
+ if (err == ERR_FILE_NOT_FOUND) {
+ error_dialog->set_text(vformat(TTR("Failed to export the project for platform '%s'.\nExport templates seem to be missing or invalid."), platform->get_name()));
+ } else { // Assume misconfiguration. FIXME: Improve error handling and preset config validation.
+ error_dialog->set_text(vformat(TTR("Failed to export the project for platform '%s'.\nThis might be due to a configuration issue in the export preset or your export settings."), platform->get_name()));
+ }
+
+ ERR_PRINTS(vformat("Failed to export the project for platform '%s'.", platform->get_name()));
error_dialog->show();
error_dialog->popup_centered_minsize(Size2(300, 80));
- ERR_PRINT("Failed to export project");
}
}