javascript - How to read from the console log and if the error includes the string " up-to-data" to pass the 'if' cycle with no error -


  p4.run("sync", filename, function (syncerror, updateddate) {             var logdata = console.log(syncerror); if() { }     }); 

i'm not sure how implement this.. if there error include string "up-to-date" "if" cycle needs pass no errors.

p4.run("sync", filename, function (syncerror, updateddate) {     var logdata = syncerror.tostring();     if(logdata.indexof('up-to-date')!==-1){         return true;     } else {         console.log('not found');         throw new error(syncerror.message);     } }); 

i figure out way. works me. hint void!


Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

javascript - jQuery UI Splitter/Resizable for unlimited amount of columns -

javascript - IE9 error '$'is not defined -