Closed superliwei closed 7 years ago
When i give a wrong image file like .jpg,error happened. I want to catch it and show a alert, is there a way to do this?
Probably this
toIco(files).then(buf => { fs.writeFileSync('favicon.ico', buf); }).catch(err => { console.log(err); });
When i give a wrong image file like .jpg,error happened. I want to catch it and show a alert, is there a way to do this?