mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-19 01:17:18 +00:00
feature(util) rm tryLog, logError
This commit is contained in:
parent
28da3c2e76
commit
d65a349c70
2 changed files with 4 additions and 42 deletions
|
|
@ -46,14 +46,12 @@
|
|||
if (error) {
|
||||
callback(error);
|
||||
} else {
|
||||
error = Util.exec.tryLog(function() {
|
||||
error = Util.exec.try(function() {
|
||||
diffResult = diff.applyPatch(data, patch);
|
||||
});
|
||||
|
||||
if (error || !diffResult)
|
||||
callback({
|
||||
message: 'Patch fail'
|
||||
});
|
||||
if (error)
|
||||
callback(error);
|
||||
else
|
||||
fs.writeFile(name, diffResult, callback);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue