diff options
author | Ignacio Etcheverry <neikeq@users.noreply.github.com> | 2017-10-24 01:17:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-24 01:17:36 +0200 |
commit | a897f7f6067ad8eece36702974b2b8ae94bff4be (patch) | |
tree | fa45a37e07dd883df3704205bcaf83b7ac5bf95f /modules/mono/editor/godotsharp_builds.cpp | |
parent | 3c69a40caf31e2f383e4b3189c91d6a0f24f5132 (diff) | |
parent | 9905002fa68f151f90a588a2c4b62b939ff31a0d (diff) |
Merge pull request #12364 from neikeq/o
Mono: Fix and cleanup build start errors
Diffstat (limited to 'modules/mono/editor/godotsharp_builds.cpp')
-rw-r--r-- | modules/mono/editor/godotsharp_builds.cpp | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/modules/mono/editor/godotsharp_builds.cpp b/modules/mono/editor/godotsharp_builds.cpp index 1bad8a3f85..d3808769fb 100644 --- a/modules/mono/editor/godotsharp_builds.cpp +++ b/modules/mono/editor/godotsharp_builds.cpp @@ -395,10 +395,11 @@ void GodotSharpBuilds::BuildProcess::start(bool p_blocking) { } if (!exited) { - ERR_PRINT("BuildProcess::start called, but process still running"); exited = true; - build_tab->on_build_exec_failed("!exited"); - return; + String message = "Tried to start build process, but it is already running"; + build_tab->on_build_exec_failed(message); + ERR_EXPLAIN(message); + ERR_FAIL(); } exited = false; @@ -410,10 +411,12 @@ void GodotSharpBuilds::BuildProcess::start(bool p_blocking) { if (d->file_exists(issues_file)) { Error err = d->remove(issues_file); if (err != OK) { - ERR_PRINTS("Cannot remove file: " + logs_dir.plus_file(issues_file)); exited = true; - build_tab->on_build_exec_failed("Cannot remove file: " + issues_file); - return; + String file_path = ProjectSettings::get_singleton()->localize_path(logs_dir).plus_file(issues_file); + String message = "Cannot remove issues file: " + file_path; + build_tab->on_build_exec_failed(message); + ERR_EXPLAIN(message); + ERR_FAIL(); } } @@ -434,7 +437,9 @@ void GodotSharpBuilds::BuildProcess::start(bool p_blocking) { if (ex) { exited = true; - build_tab->on_build_exec_failed("The build constructor threw an exception.\n" + GDMonoUtils::get_exception_name_and_message(ex)); + String message = "The build constructor threw an exception.\n" + GDMonoUtils::get_exception_name_and_message(ex); + build_tab->on_build_exec_failed(message); + ERR_EXPLAIN(message); ERR_FAIL(); } @@ -452,7 +457,9 @@ void GodotSharpBuilds::BuildProcess::start(bool p_blocking) { if (ex) { exited = true; - build_tab->on_build_exec_failed("The build method threw an exception.\n" + GDMonoUtils::get_exception_name_and_message(ex)); + String message = "The build method threw an exception.\n" + GDMonoUtils::get_exception_name_and_message(ex); + build_tab->on_build_exec_failed(message); + ERR_EXPLAIN(message); ERR_FAIL(); } |