I'm doing a Web Service in Node.js where I have to do several validations but if one of those validations gives an error I need the Web Service to continue running but stop validating, as if it were a Try ... catch alone I do not know if in my case you can use try ... catch. HELP!
This is the example code:
var number = "No soy un numero";
if(Number.IsInteger(number) == true){
console.log("Soy un numero")
}else{
new throw Exception("Se necesita un numero")
//aqui no deberia de seguir ejecutando el codigo.
}
//No deberia imprimir esto.
console.log("Continua...")