ok, I feel stupid asking this question and forgive my bad research methods, but ...
using example
if (obj.attr1.attr2.attr3 == 'constant') return;
else if (condition2) ...
if obj.attr1 is undefined, the javascript engine throws an error.
What is the error that occurs? Is it universally defined?
can globally capture this error?
if it is captured, is it possible to execute the next line condition2 ?
to clarify: the error occurs due to an attempt to get the undefined attribute. is there any way to know that this is a mistake? is it in some kind of table of standard javascript error messages?
and secondly, capturing the error upstream, is it possible for the program to continuously flow?
source share