diff options
author | Braden Bodily <thebodily@gmail.com> | 2019-08-14 20:57:49 -0600 |
---|---|---|
committer | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-08-17 12:33:15 +0200 |
commit | 71d71d55b5c0d6da4d1555823ac432bf0b33389a (patch) | |
tree | 20b2e819d599d6d1bd459bb51880c31e97cfe825 /core/script_debugger_remote.cpp | |
parent | 40640a01dc90be00e55e4eef3c7800401ef63b18 (diff) |
Replace 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG' in 'core/' and 'editor/'
Condensed some if and ERR statements. Added dots to end of error messages
Couldn't figure out EXPLAINC. These files gave me trouble: core/error_macros.h, core/io/file_access_buffered_fa.h (where is it?),
core/os/memory.cpp,
drivers/png/png_driver_common.cpp,
drivers/xaudio2/audio_driver_xaudio2.cpp (where is it?)
Diffstat (limited to 'core/script_debugger_remote.cpp')
-rw-r--r-- | core/script_debugger_remote.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/core/script_debugger_remote.cpp b/core/script_debugger_remote.cpp index 6dd9054aaa..2a061f0947 100644 --- a/core/script_debugger_remote.cpp +++ b/core/script_debugger_remote.cpp @@ -89,7 +89,7 @@ Error ScriptDebuggerRemote::connect_to_host(const String &p_host, uint16_t p_por if (tcp_client->get_status() != StreamPeerTCP::STATUS_CONNECTED) { - ERR_PRINTS("Remote Debugger: Unable to connect. Status: " + String::num(tcp_client->get_status())); + ERR_PRINTS("Remote Debugger: Unable to connect. Status: " + String::num(tcp_client->get_status()) + "."); return FAILED; }; @@ -110,7 +110,7 @@ void ScriptDebuggerRemote::_put_variable(const String &p_name, const Variant &p_ int len = 0; Error err = encode_variant(var, NULL, len, true); if (err != OK) - ERR_PRINT("Failed to encode variant"); + ERR_PRINT("Failed to encode variant."); if (len > packet_peer_stream->get_output_buffer_max_size()) { //limit to max size packet_peer_stream->put_var(Variant()); @@ -134,10 +134,7 @@ void ScriptDebuggerRemote::debug(ScriptLanguage *p_script, bool p_can_continue) //this function is called when there is a debugger break (bug on script) //or when execution is paused from editor - if (!tcp_client->is_connected_to_host()) { - ERR_EXPLAIN("Script Debugger failed to connect, but being used anyway."); - ERR_FAIL(); - } + ERR_FAIL_COND_MSG(!tcp_client->is_connected_to_host(), "Script Debugger failed to connect, but being used anyway."); packet_peer_stream->put_var("debug_enter"); packet_peer_stream->put_var(2); |