summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/gdscript_parser.cpp
diff options
context:
space:
mode:
authorRobin Hübner <profan@prfn.se>2019-08-09 06:49:33 +0200
committerRobin Hübner <profan@prfn.se>2019-08-09 11:13:24 +0200
commit6ab118c4646b136cd83ff8406ce62a2576809def (patch)
tree7dc10741d9b7c609951f3568e31479257311c59b /modules/gdscript/gdscript_parser.cpp
parent22b42c3315081144ecea26e4a51600255dc8eed6 (diff)
downloadredot-engine-6ab118c4646b136cd83ff8406ce62a2576809def.tar.gz
Replace 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG' in "platform", "modules/gdnative", "modules/gdscript" directories.
Diffstat (limited to 'modules/gdscript/gdscript_parser.cpp')
-rw-r--r--modules/gdscript/gdscript_parser.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp
index 357e9c9615..1303c43944 100644
--- a/modules/gdscript/gdscript_parser.cpp
+++ b/modules/gdscript/gdscript_parser.cpp
@@ -1136,10 +1136,7 @@ GDScriptParser::Node *GDScriptParser::_parse_expression(Node *p_parent, bool p_s
return NULL; //nothing
}
- if (!expr) {
- ERR_EXPLAIN("GDScriptParser bug, couldn't figure out what expression is...");
- ERR_FAIL_V(NULL);
- }
+ ERR_FAIL_COND_V_MSG(!expr, NULL, "GDScriptParser bug, couldn't figure out what expression is.");
/******************/
/* Parse Indexing */
@@ -4019,8 +4016,7 @@ void GDScriptParser::_parse_class(ClassNode *p_class) {
tokenizer->advance();
if (tokenizer->get_token() == GDScriptTokenizer::TK_PARENTHESIS_CLOSE) {
- ERR_EXPLAIN("Exporting bit flags hint requires string constants.");
- WARN_DEPRECATED;
+ WARN_DEPRECATED_MSG("Exporting bit flags hint requires string constants.");
break;
}
if (tokenizer->get_token() != GDScriptTokenizer::TK_COMMA) {
@@ -6695,8 +6691,7 @@ bool GDScriptParser::_get_function_signature(DataType &p_base_type, const String
}
if (!ClassDB::class_exists(native)) {
if (!check_types) return false;
- ERR_EXPLAIN("Parser bug: Class '" + String(native) + "' not found.");
- ERR_FAIL_V(false);
+ ERR_FAIL_V_MSG(false, "Parser bug: Class '" + String(native) + "' not found.");
}
MethodBind *method = ClassDB::get_method(native, p_function);
@@ -7204,8 +7199,7 @@ bool GDScriptParser::_get_member_type(const DataType &p_base_type, const StringN
}
if (!ClassDB::class_exists(native)) {
if (!check_types) return false;
- ERR_EXPLAIN("Parser bug: Class '" + String(native) + "' not found.");
- ERR_FAIL_V(false);
+ ERR_FAIL_V_MSG(false, "Parser bug: Class '" + String(native) + "' not found.");
}
bool valid = false;