~ubuntu-branches/ubuntu/vivid/qtdeclarative-opensource-src-gles/vivid

« back to all changes in this revision

Viewing changes to src/qml/jsruntime/qv4qobjectwrapper.cpp

  • Committer: Package Import Robot
  • Author(s): Timo Jyrinki
  • Date: 2015-03-11 16:51:45 UTC
  • mfrom: (1.1.4)
  • Revision ID: package-import@ubuntu.com-20150311165145-7653iqap3mau92gy
Tags: 5.4.1-0ubuntu1
Sync package with qtdeclarative-opensource-src - 5.4.1-1ubuntu3

Show diffs side-by-side

added added

removed removed

Lines of Context:
803
803
 
804
804
            f->call(callData);
805
805
            if (scope.hasException() && v4->v8Engine) {
 
806
                QQmlError error = QV4::ExecutionEngine::catchExceptionAsQmlError(ctx);
 
807
                if (error.description().isEmpty()) {
 
808
                    QV4::ScopedString name(scope, f->name());
 
809
                    error.setDescription(QString::fromLatin1("Unknown exception occurred during evaluation of connected function: %1").arg(name->toQString()));
 
810
                }
806
811
                if (QQmlEngine *qmlEngine = v4->v8Engine->engine()) {
807
 
                    QQmlError error = QV4::ExecutionEngine::catchExceptionAsQmlError(ctx);
808
 
                    if (error.description().isEmpty()) {
809
 
                        QV4::ScopedString name(scope, f->name());
810
 
                        error.setDescription(QString(QLatin1String("Unknown exception occurred during evaluation of connected function: %1")).arg(name->toQString()));
811
 
                    }
812
812
                    QQmlEnginePrivate::get(qmlEngine)->warning(error);
 
813
                } else {
 
814
                    QMessageLogger(error.url().toString().toLatin1().constData(),
 
815
                                   error.line(), 0).warning().noquote()
 
816
                            << error.toString();
813
817
                }
814
818
            }
815
819
        }