format error output

This commit is contained in:
王劲鹏 2021-02-08 11:41:57 +08:00 committed by osborn
parent ed7d186510
commit e00bae87f8

View File

@ -58,11 +58,11 @@ QJSValue DoricNativeJSE::invokeObject(QString objectName, QString functionName,
QJSValue result = function.call(args);
if (result.isError()) {
qDebug() << "Uncaught exception at line"
qDebug() << "++++++++++++++++++++++++";
qCritical() << "Uncaught exception at line"
<< result.property("lineNumber").toInt() << ":"
<< result.toString();
QStringList stacktraces = result.property("stack").toString().split("\n");
qDebug() << "++++++++++++++++++++++++";
foreach (QString stacktrace, stacktraces) { qDebug() << stacktrace; }
qDebug() << "------------------------";
}