Is there any way to show all JS errors? by all errors I mean fore example undefined variable (without using try & catch in every function - which is painless)
Asked
Active
Viewed 129 times
1
-
1use TypeScript you will be amazed – Harry Apr 24 '17 at 21:25
-
1Using try+catch is not appropriate unless the exception is to be "meaningfully handled" (which should mean something more relevant than "written to the console"). In any case, if using the *developer tools* in Chrome you can enable 'break on every exception'. The introduction of the unexpected value is the original flaw and such remnants should be cleared through integration tests (using the browser / engine to help fix tests) and fixed before release. – user2864740 Apr 24 '17 at 21:26
-
@Haris yes, I know, but for that project I can't use typescript:( – WEBCENTER Apr 24 '17 at 21:26
-
@user2864740 try + catch for every function will be painfull:(. Where in Chrome is 'break on every exception' option?:) – WEBCENTER Apr 24 '17 at 21:28
-
1@K.A.T. Ref. http://stackoverflow.com/questions/2233339/javascript-is-there-a-way-to-get-chrome-to-break-on-all-errors – user2864740 Apr 24 '17 at 21:56