0

I just made the mistake in Visual Studio 2013 of Ticking the "Break on this type of error" while debugging my web forms app.

When I tried to run my application again, it kept halting during the startup of the application in the jScript with a syntax error (0x800a139e - JavaScript runtime error: SyntaxError). I eventually unchecked the debugger box and my application started working again.

Now I expect that a top quality script like jQuery will throw errors when I (or the system) do something wrong, but can anyone explain why it would be throwing Syntax Errors during the normal execution of the script?

REVISED, AMPLIFIED QUESTION:

I understand, and it is clearly documented, that jScript uses handled exceptions to avoid having to check for various situations. This is not a bug in of itself. I extensively use handle exceptions in my code and they are great for unusual error conditions. However, I try to avoid at all costs any syntactical errors in my code that might arise at runtime.

I also know from extensive googling, and following up on links, that the use of exceptions is considered normal for jScript and however much it interferes with the use of Visual Studio in debugging scripts, that both parties consider it a problem with the other party's product.

However, my question is much simpler. What is it that jScript is doing that validly produces Syntax Errors that because they are handled, are not considered errors?

At this point, I have solved my immediate problem. I have posted this question to try to understand why invalid code is considered "not a bug". Handled exceptions are "not a bug", but to me "Syntax Errors" are. Why am I wrong?

9
  • jQuery doesn't have syntax errors. If it had - it wouldn't run in your app successfully. Commented Jul 1, 2014 at 1:17
  • Similiar question that I started.. stackoverflow.com/questions/24131986/… Commented Jul 1, 2014 at 1:17
  • Similar question, but not the same. I read your question first, but my question is not why exceptions, but why Syntax Error? Commented Jul 1, 2014 at 1:23
  • zerkms: I do not know what the error is, I would not expect jQuery to contain any Syntax Error, but this is what Visual Studio 2013 is reporting. My question is WHY? Commented Jul 1, 2014 at 1:24
  • Have you Googled this issue? For example, see this thread on the ASP.NET forum Commented Jul 1, 2014 at 1:47

1 Answer 1

0

It seems that jQuery makes assumptions on variables that are not always true and hence gives a Syntax Error when those variables do not exist in the expected form.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.