summaryrefslogtreecommitdiff
path: root/editor/find_in_files.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-09-25 11:51:54 +0200
committerGitHub <noreply@github.com>2019-09-25 11:51:54 +0200
commitdec10dd776fca2994277faa3a97b13e70317f784 (patch)
treecea7622b2e2bb0d2cede33274807cb98b4fef856 /editor/find_in_files.cpp
parentde03ee94cc4df1a451c6f64e984b1da307d0f4b4 (diff)
parent17732fe698b835c29f77c84f329b2ed6cab215ce (diff)
Merge pull request #32051 from qarmin/some_error_explanation
Added some obvious errors explanations
Diffstat (limited to 'editor/find_in_files.cpp')
-rw-r--r--editor/find_in_files.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/find_in_files.cpp b/editor/find_in_files.cpp
index def22d07de..752e49a932 100644
--- a/editor/find_in_files.cpp
+++ b/editor/find_in_files.cpp
@@ -829,7 +829,7 @@ void FindInFilesPanel::apply_replaces_in_file(String fpath, const Vector<Result>
// however that means either losing changes or losing replaces.
FileAccess *f = FileAccess::open(fpath, FileAccess::READ);
- ERR_FAIL_COND(f == NULL);
+ ERR_FAIL_COND_MSG(f == NULL, "Cannot open file from path '" + fpath + "'.");
String buffer;
int current_line = 1;
@@ -876,7 +876,7 @@ void FindInFilesPanel::apply_replaces_in_file(String fpath, const Vector<Result>
// Now the modified contents are in the buffer, rewrite the file with our changes
Error err = f->reopen(fpath, FileAccess::WRITE);
- ERR_FAIL_COND(err != OK);
+ ERR_FAIL_COND_MSG(err != OK, "Cannot create file in path '" + fpath + "'.");
f->store_string(buffer);