Suppose I have the following typo in my Node.Js app Javascript code:
max_weight = Match.floor(max_weight/min_weight)
It's supposed to be Math.floor
instead of Match.floor
so when the code executes I get the error:
ReferenceError: Match is not defined
and then my Node.Js app quits.
How can I ensure that even if an error like this occurs, the app does not quit but simply reports the error and continues the code execution?
I understand I should solve problems like this before launching into production, but, still, what if I want the code to continue the execution despite the error?