diff options
author | qarmin <mikrutrafal54@gmail.com> | 2019-09-25 10:28:50 +0200 |
---|---|---|
committer | qarmin <mikrutrafal54@gmail.com> | 2019-09-25 10:28:50 +0200 |
commit | 17732fe698b835c29f77c84f329b2ed6cab215ce (patch) | |
tree | b95c08185e886dc6410ba8646e5ff839382b4e01 /editor/editor_resource_preview.cpp | |
parent | e9f49a6d5ac88a6afca8a16f91a05f4fcdf5a589 (diff) | |
download | redot-engine-17732fe698b835c29f77c84f329b2ed6cab215ce.tar.gz |
Added some obvious errors explanations
Diffstat (limited to 'editor/editor_resource_preview.cpp')
-rw-r--r-- | editor/editor_resource_preview.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/editor_resource_preview.cpp b/editor/editor_resource_preview.cpp index 5c15ebb1eb..b528cda8ff 100644 --- a/editor/editor_resource_preview.cpp +++ b/editor/editor_resource_preview.cpp @@ -203,7 +203,7 @@ void EditorResourcePreview::_generate_preview(Ref<ImageTexture> &r_texture, Ref< } Error err; FileAccess *f = FileAccess::open(cache_base + ".txt", FileAccess::WRITE, &err); - ERR_FAIL_COND(err != OK); + ERR_FAIL_COND_MSG(err != OK, "Cannot create file '" + cache_base + ".txt'."); f->store_line(itos(thumbnail_size)); f->store_line(itos(has_small_texture)); f->store_line(itos(FileAccess::get_modified_time(p_item.path))); @@ -450,7 +450,7 @@ void EditorResourcePreview::check_for_invalidation(const String &p_path) { } void EditorResourcePreview::start() { - ERR_FAIL_COND(thread); + ERR_FAIL_COND_MSG(thread, "Thread already started."); thread = Thread::create(_thread_func, this); } |