mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 17:00:13 +02:00
Merge pull request #3077 from ctrlaltdavid/19790
Code Review for Job #19790
This commit is contained in:
commit
72f9346543
1 changed files with 11 additions and 8 deletions
|
@ -314,8 +314,9 @@ void ScriptEngine::evaluate() {
|
||||||
|
|
||||||
if (_engine.hasUncaughtException()) {
|
if (_engine.hasUncaughtException()) {
|
||||||
int line = _engine.uncaughtExceptionLineNumber();
|
int line = _engine.uncaughtExceptionLineNumber();
|
||||||
qDebug() << "Uncaught exception at line" << line << ":" << result.toString();
|
qDebug() << "Uncaught exception at (" << _fileNameString << ") line" << line << ":" << result.toString();
|
||||||
emit errorMessage("Uncaught exception at line" + QString::number(line) + ":" + result.toString());
|
emit errorMessage("Uncaught exception at (" + _fileNameString + ") line" + QString::number(line) + ":" + result.toString());
|
||||||
|
_engine.clearExceptions();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -324,7 +325,7 @@ QScriptValue ScriptEngine::evaluate(const QString& program, const QString& fileN
|
||||||
bool hasUncaughtException = _engine.hasUncaughtException();
|
bool hasUncaughtException = _engine.hasUncaughtException();
|
||||||
if (hasUncaughtException) {
|
if (hasUncaughtException) {
|
||||||
int line = _engine.uncaughtExceptionLineNumber();
|
int line = _engine.uncaughtExceptionLineNumber();
|
||||||
qDebug() << "Uncaught exception at line" << line << ": " << result.toString();
|
qDebug() << "Uncaught exception at (" << _fileNameString << ") line" << line << ": " << result.toString();
|
||||||
}
|
}
|
||||||
emit evaluationFinished(result, hasUncaughtException);
|
emit evaluationFinished(result, hasUncaughtException);
|
||||||
_engine.clearExceptions();
|
_engine.clearExceptions();
|
||||||
|
@ -353,9 +354,9 @@ void ScriptEngine::run() {
|
||||||
QScriptValue result = _engine.evaluate(_scriptContents);
|
QScriptValue result = _engine.evaluate(_scriptContents);
|
||||||
if (_engine.hasUncaughtException()) {
|
if (_engine.hasUncaughtException()) {
|
||||||
int line = _engine.uncaughtExceptionLineNumber();
|
int line = _engine.uncaughtExceptionLineNumber();
|
||||||
|
qDebug() << "Uncaught exception at (" << _fileNameString << ") line" << line << ":" << result.toString();
|
||||||
qDebug() << "Uncaught exception at line" << line << ":" << result.toString();
|
emit errorMessage("Uncaught exception at (" + _fileNameString + ") line" + QString::number(line) + ":" + result.toString());
|
||||||
emit errorMessage("Uncaught exception at line" + QString::number(line) + ":" + result.toString());
|
_engine.clearExceptions();
|
||||||
}
|
}
|
||||||
|
|
||||||
QElapsedTimer startTime;
|
QElapsedTimer startTime;
|
||||||
|
@ -495,8 +496,9 @@ void ScriptEngine::run() {
|
||||||
|
|
||||||
if (_engine.hasUncaughtException()) {
|
if (_engine.hasUncaughtException()) {
|
||||||
int line = _engine.uncaughtExceptionLineNumber();
|
int line = _engine.uncaughtExceptionLineNumber();
|
||||||
qDebug() << "Uncaught exception at line" << line << ":" << _engine.uncaughtException().toString();
|
qDebug() << "Uncaught exception at (" << _fileNameString << ") line" << line << ":" << _engine.uncaughtException().toString();
|
||||||
emit errorMessage("Uncaught exception at line" + QString::number(line) + ":" + _engine.uncaughtException().toString());
|
emit errorMessage("Uncaught exception at (" + _fileNameString + ") line" + QString::number(line) + ":" + _engine.uncaughtException().toString());
|
||||||
|
_engine.clearExceptions();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
emit scriptEnding();
|
emit scriptEnding();
|
||||||
|
@ -656,5 +658,6 @@ void ScriptEngine::include(const QString& includeFile) {
|
||||||
int line = _engine.uncaughtExceptionLineNumber();
|
int line = _engine.uncaughtExceptionLineNumber();
|
||||||
qDebug() << "Uncaught exception at (" << includeFile << ") line" << line << ":" << result.toString();
|
qDebug() << "Uncaught exception at (" << includeFile << ") line" << line << ":" << result.toString();
|
||||||
emit errorMessage("Uncaught exception at (" + includeFile + ") line" + QString::number(line) + ":" + result.toString());
|
emit errorMessage("Uncaught exception at (" + includeFile + ") line" + QString::number(line) + ":" + result.toString());
|
||||||
|
_engine.clearExceptions();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue