JavaScript错误处理的方式的正确姿势

try {
    something
} catch (e) {
    window.location.href =
        "http://stackoverflow.com/search?q=[js]+" +
        e.message;
}

确实是 :

([][[]]+[])[+!![]]+([]+{})[!+[]+!![]]

 参考:

https://mp.weixin.qq.com/s?__biz=MzI5Mzk3NjM0MA==&mid=2247484311&idx=1&sn=a514ffddad92c77f4128aa8cbe1a94b0&chksm=ec68a3ecdb1f2afa328f3f580cc7fa3d045b6ef8540c8fb07ccce5e0ea246b2253604c52f64f&mpshare=1&scene=23&srcid=&sharer_sharetime=1568807759732&sharer_shareid=acb96c6b7dd22a2c2b441d6be0e6b037#rd 

发布了54 篇原创文章 · 获赞 43 · 访问量 7万+

猜你喜欢

转载自blog.csdn.net/xyx107/article/details/100996229