Merge pull request #31227 from profan/fix/err-explain-usages

Replace 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG' in "platform", "modules/gdnative", "modules/gdscript" directories.
This commit is contained in:
Rémi Verschelde 2019-08-09 12:28:06 +02:00 committed by GitHub
commit 80c7cb6378
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 112 additions and 306 deletions

View file

@ -1140,10 +1140,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 */
@ -4023,8 +4020,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) {
@ -6699,8 +6695,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);
@ -7208,8 +7203,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;