js打印异常日志
1、代码
var x = 12; console.assert(x==12, "this will pass") console.assert(x>12, "this will fail")
第一个参数放我们希望成立的表达式,如果运行时不成立则打印这个异常,系统会将调用堆栈也打印出来。【QML中使用】
详情可查阅Qt手册:console log
长风破浪会有时,直挂云帆济沧海!
可通过下方链接找到博主
https://www.cnblogs.com/judes/p/10875138.html