From 5ca74604217758d91e344b052fe87c9eda8940a9 Mon Sep 17 00:00:00 2001 From: Michael Alexsander Silva Dias Date: Thu, 8 Aug 2019 17:08:27 -0300 Subject: Replace 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG' in "main" and "servers" directories --- main/main.cpp | 47 +++++++++++++++-------------------------------- 1 file changed, 15 insertions(+), 32 deletions(-) (limited to 'main/main.cpp') diff --git a/main/main.cpp b/main/main.cpp index 39cd2548fb..027273c4f4 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -816,10 +816,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph String bp = breakpoints[i]; int sp = bp.find_last(":"); - if (sp == -1) { - ERR_EXPLAIN("Invalid breakpoint: '" + bp + "', expected file:line format."); - ERR_CONTINUE(true); - } + ERR_CONTINUE_MSG(sp == -1, "Invalid breakpoint: '" + bp + "', expected file:line format."); script_debugger->insert_breakpoint(bp.substr(sp + 1, bp.length()).to_int(), bp.substr(0, sp)); } @@ -1375,10 +1372,7 @@ bool Main::start() { { DirAccessRef da = DirAccess::open(doc_tool); - if (!da) { - ERR_EXPLAIN("Argument supplied to --doctool must be a base Godot build directory"); - ERR_FAIL_V(false); - } + ERR_FAIL_COND_V_MSG(!da, false, "Argument supplied to --doctool must be a base Godot build directory."); } DocData doc; doc.generate(doc_base); @@ -1462,8 +1456,7 @@ bool Main::start() { } else if (script != "") { Ref