Last post Jan 11, 2017 11:34 AM by JAYHAWKER
Jan 10, 2017 03:22 PM|JAYHAWKER|LINK
I want the "error list" that shows up at the bottom of Visual studio to ignore certain things that aren't actually errors. Things like setting focus to a textbox. I'd like to add "onFocus="this.select();"" as an exception some way or another.
Jan 10, 2017 04:24 PM|AZMatt|LINK
Jan 10, 2017 04:27 PM|JAYHAWKER|LINK
Thanks for the reply. It isn't actually an error, but visual studio looks at it as if it is. . So the try catch won't keep Visual studio from thinking it is an error and then showing up in the error list if I am correct. It would just keep me from having
a problem running the code if it was an error. Right?
Jan 11, 2017 09:49 AM|Cathy Zou|LINK
It would just keep me from having a problem running the code if it was an error. Right?
Yes, you are right.
As description in the above link:
The try statement lets you test a block of code for errors.
The catch statement lets you handle the error.
If the code in try statement have error. It won’t throw exception. Instead, the code in catch statement will be executed.
Jan 11, 2017 10:01 AM|PatriceSc|LINK
What if you using onfocus rather than onFocus? It's not a case issue in your DOM event?
Jan 11, 2017 11:34 AM|JAYHAWKER|LINK
I tried that as well, but Visual studio still shows both cases as an error for some reason. Thanks for your efforts!