I make mistakes.

Sometimes I should write code like:

 $("#divEditUnit_" + UnitID).fadeOut();

I expect "#divEditUnit_" + UnitID to evaluate to something like
#divEditUnit_f3c23142-e933-4e13-ada3-2592893dc17c, which would be nice
since I have a div with an id of divEditUnit_f3c23142-e933-4e13-
ada3-2592893dc17c

but instead, I goof and type

 $("#divEditUnit_" +UnitID).fadeOut();

+UnitID evaluates to NaN,  [Thank you operator overloading!!]  so I
just told Jquery to go fetch a div called divEditUnit_NaN, which of
course doesn't exist.

jQuery doesn't notify me of this problem, my code just fails to work
as expected and I spend half an hour before I notice that I forgot a
space between + and UnitID.

Is there some way to tell jQuery to actually throw errors instead of
failing silently?

Maybe something like:

actuallyReportErrors = 1;

Because this this "fail silently" stuff is a major time waster.

Reply via email to