You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
Merge pull request #32051 from qarmin/some_error_explanation
Added some obvious errors explanations
This commit is contained in:
@@ -903,7 +903,7 @@ void EditorNode::_set_scene_metadata(const String &p_file, int p_idx) {
|
||||
}
|
||||
|
||||
Error err = cf->save(path);
|
||||
ERR_FAIL_COND(err != OK);
|
||||
ERR_FAIL_COND_MSG(err != OK, "Cannot save config file to '" + path + "'.");
|
||||
}
|
||||
|
||||
bool EditorNode::_find_and_save_resource(RES p_res, Map<RES, bool> &processed, int32_t flags) {
|
||||
@@ -2597,7 +2597,7 @@ void EditorNode::_save_screenshot(NodePath p_path) {
|
||||
img->flip_y();
|
||||
viewport->set_clear_mode(Viewport::CLEAR_MODE_ALWAYS);
|
||||
Error error = img->save_png(p_path);
|
||||
ERR_FAIL_COND(error != OK);
|
||||
ERR_FAIL_COND_MSG(error != OK, "Cannot save screenshot to file '" + p_path + "'.");
|
||||
}
|
||||
|
||||
void EditorNode::_tool_menu_option(int p_idx) {
|
||||
@@ -3683,7 +3683,7 @@ Ref<Texture> EditorNode::get_object_icon(const Object *p_object, const String &p
|
||||
}
|
||||
|
||||
Ref<Texture> EditorNode::get_class_icon(const String &p_class, const String &p_fallback) const {
|
||||
ERR_FAIL_COND_V(p_class.empty(), NULL);
|
||||
ERR_FAIL_COND_V_MSG(p_class.empty(), NULL, "Class name cannot be empty.");
|
||||
|
||||
if (gui_base->has_icon(p_class, "EditorIcons")) {
|
||||
return gui_base->get_icon(p_class, "EditorIcons");
|
||||
|
||||
Reference in New Issue
Block a user