开发者

How can I output an error in Javascript that is visible in the debugger, without halting the flow of my program?

开发者 https://www.devze.com 2023-03-09 13:26 出处:网络
At the moment, if a developer implements something and forgets to create a template for it in Javascript, there is an error and the whole control I am writing breaks. I am about to add some e开发者_JS

At the moment, if a developer implements something and forgets to create a template for it in Javascript, there is an error and the whole control I am writing breaks. I am about to add some e开发者_JS百科rror checking that will stop it breaking, but I would still like to output something to the console so a developer can see the problem, rather than have the item simply not appear and leave them scratching their head.

How can I do this?


You could use exception handling in conjunction with JavaScript logger, such as log4javascript.

0

精彩评论

暂无评论...
验证码 换一张
取 消