Many web developers are not aware of the Java Script exceptions handling mechanism that allows us to handle excepetions using try and catch blocks, as in other programming languages. The following video clips provide more explanations.
You can find more info about the Java Script Programming professional course I teach at www.xperato.com. The community version is available for free personal usage at www.abelski.com.