mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-15 12:51:00 +02:00
scripted-diff: Replace error() with LogError()
This fixes the log output when -logsourcelocations is used.
Also, instead of 'ERROR:', the log will now say '[error]', like other
errors logged with LogError.
-BEGIN VERIFY SCRIPT-
sed -i --regexp-extended 's! error\("([^"]+)"! LogError("\1\\n"!g' $( git grep -l ' error(' ./src/ )
-END VERIFY SCRIPT-
This commit is contained in:
parent
fa808fb749
commit
fad0335517
13 changed files with 97 additions and 97 deletions
|
|
@ -82,17 +82,17 @@ bool FlatFileSeq::Flush(const FlatFilePos& pos, bool finalize)
|
|||
{
|
||||
FILE* file = Open(FlatFilePos(pos.nFile, 0)); // Avoid fseek to nPos
|
||||
if (!file) {
|
||||
error("%s: failed to open file %d", __func__, pos.nFile);
|
||||
LogError("%s: failed to open file %d\n", __func__, pos.nFile);
|
||||
return false;
|
||||
}
|
||||
if (finalize && !TruncateFile(file, pos.nPos)) {
|
||||
fclose(file);
|
||||
error("%s: failed to truncate file %d", __func__, pos.nFile);
|
||||
LogError("%s: failed to truncate file %d\n", __func__, pos.nFile);
|
||||
return false;
|
||||
}
|
||||
if (!FileCommit(file)) {
|
||||
fclose(file);
|
||||
error("%s: failed to commit file %d", __func__, pos.nFile);
|
||||
LogError("%s: failed to commit file %d\n", __func__, pos.nFile);
|
||||
return false;
|
||||
}
|
||||
DirectoryCommit(m_dir);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue