I am working on a large code base and am trying to reorganize a bunch of old javascript code. My boss noted that there are many blocks in the code try{ }catch(err){ }where the developer left an empty block catch.
In any case, is there any harm in leaving these blocks of code empty? I heard that this can cause problems in Java, but is there any harm in the case of JavaScript.
Example:
try {
if (value != null) {
var typeOne = report;
returnVal = formatB;
}
} catch (err) {
}
source
share