Lucky hour! Grab a free trial license — offer ends in 00:59:58. Claim now
The analyzer has detected that an error object (Error) is created but not used.
The example:
function checkIndex(index) {
if (index < 0)
new Error("Index out of bounds");
return index;
}
In this case, the error object is created without interrupting the execution flow because the throw keyword is missing.
The fixed code:
function checkIndex(index) {
if (index < 0)
throw new Error("Index out of bounds");
return index;
}
This diagnostic is classified as:
|
Was this page helpful?
Your message has been sent. We will email you at
If you do not see the email in your inbox, please check if it is filtered to one of the following folders: