How to log exceptions in JavaScript

后端 未结 7 1511
太阳男子
太阳男子 2020-12-15 03:52

As a C# developer I\'m used to the following style of exception handling:

try
{
    throw SomeException(\"hahahaha!\");
}
catch (Exception ex)
{
    Log(ex.T         


        
7条回答
  •  臣服心动
    2020-12-15 04:20

    You can use logging tools like Yahoo! UI Library - Logger to log the errors/informative messages.

提交回复
热议问题