summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorMarcel Admiraal <madmiraal@users.noreply.github.com>2019-11-11 10:24:04 +0100
committerMarcel Admiraal <madmiraal@users.noreply.github.com>2019-11-11 10:24:04 +0100
commitd18b2e599d838201ecf14822d5823269859897da (patch)
tree67d7e58c17c9a7b387da6f32f44bd383e643359f /modules
parentb7fdac60f16cef462a8ef97ce8c77308ba38a62f (diff)
Remove all uses of ERR_EXPLAIN macros.
Diffstat (limited to 'modules')
-rw-r--r--modules/assimp/editor_scene_importer_assimp.cpp5
-rw-r--r--modules/assimp/import_utils.h3
-rw-r--r--modules/gdscript/language_server/gdscript_workspace.cpp3
-rw-r--r--modules/xatlas_unwrap/register_types.cpp3
4 files changed, 6 insertions, 8 deletions
diff --git a/modules/assimp/editor_scene_importer_assimp.cpp b/modules/assimp/editor_scene_importer_assimp.cpp
index 830e6e7e0c..3172d1e592 100644
--- a/modules/assimp/editor_scene_importer_assimp.cpp
+++ b/modules/assimp/editor_scene_importer_assimp.cpp
@@ -148,8 +148,9 @@ Node *EditorSceneImporterAssimp::import_scene(const String &p_path, uint32_t p_f
//aiProcess_SplitByBoneCount |
0;
aiScene *scene = (aiScene *)importer.ReadFile(s_path.c_str(), post_process_Steps);
- ERR_EXPLAIN(String("Open Asset Import failed to open: ") + String(importer.GetErrorString()));
- ERR_FAIL_COND_V(scene == NULL, NULL);
+
+ ERR_FAIL_COND_V_MSG(scene == NULL, NULL, String("Open Asset Import failed to open: ") + String(importer.GetErrorString()));
+
return _generate_scene(p_path, scene, p_flags, p_bake_fps, max_bone_weights);
}
diff --git a/modules/assimp/import_utils.h b/modules/assimp/import_utils.h
index 4be76ade0f..7b14804ddc 100644
--- a/modules/assimp/import_utils.h
+++ b/modules/assimp/import_utils.h
@@ -369,8 +369,7 @@ public:
state.path_to_image_cache.insert(p_path, img);
return img;
} else if (tex->CheckFormat("dds")) {
- ERR_EXPLAIN("Open Asset Import: Embedded dds not implemented");
- ERR_FAIL_COND_V(true, Ref<Image>());
+ ERR_FAIL_COND_V_MSG(true, Ref<Image>(), "Open Asset Import: Embedded dds not implemented");
}
} else {
Ref<Image> img;
diff --git a/modules/gdscript/language_server/gdscript_workspace.cpp b/modules/gdscript/language_server/gdscript_workspace.cpp
index c289ff6c07..f2c0e7035b 100644
--- a/modules/gdscript/language_server/gdscript_workspace.cpp
+++ b/modules/gdscript/language_server/gdscript_workspace.cpp
@@ -117,8 +117,7 @@ void GDScriptWorkspace::reload_all_workspace_scripts() {
if (S) {
err_msg += "\n" + S->get()->get_error();
}
- ERR_EXPLAIN(err_msg);
- ERR_CONTINUE(err != OK);
+ ERR_CONTINUE_MSG(err != OK, err_msg);
}
}
}
diff --git a/modules/xatlas_unwrap/register_types.cpp b/modules/xatlas_unwrap/register_types.cpp
index 65b3cf08f5..2fc554fe7a 100644
--- a/modules/xatlas_unwrap/register_types.cpp
+++ b/modules/xatlas_unwrap/register_types.cpp
@@ -65,8 +65,7 @@ bool xatlas_mesh_lightmap_unwrap_callback(float p_texel_size, const float *p_ver
xatlas::Atlas *atlas = xatlas::Create();
printf("Adding mesh..\n");
xatlas::AddMeshError::Enum err = xatlas::AddMesh(atlas, input_mesh, 1);
- ERR_EXPLAINC(xatlas::StringForEnum(err));
- ERR_FAIL_COND_V(err != xatlas::AddMeshError::Enum::Success, false);
+ ERR_FAIL_COND_V_MSG(err != xatlas::AddMeshError::Enum::Success, false, xatlas::StringForEnum(err));
printf("Generate..\n");
xatlas::Generate(atlas, chart_options, NULL, pack_options);