Merge pull request #26150 from akien-mga/export-error-message

Improve error message on project export failure
This commit is contained in:
Rémi Verschelde 2019-02-22 12:06:40 +01:00 committed by GitHub
commit 2985eabc7f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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");
}
}