Commit be72d67b authored by Hans-Christian Ebke's avatar Hans-Christian Ebke
Browse files

Core: Implemented script engine handler error logging.


git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@13312 383ad7c9-94d9-4d36-a494-682f7c89f535
parent ea1a5e01
...@@ -421,6 +421,8 @@ Core::init() { ...@@ -421,6 +421,8 @@ Core::init() {
// Set a reference to the scriptengine for simple rpc calls // Set a reference to the scriptengine for simple rpc calls
RPC::setScriptEngine(&scriptEngine_); RPC::setScriptEngine(&scriptEngine_);
connect(&scriptEngine_, SIGNAL( signalHandlerException(const QScriptValue &) ), this, SLOT( slot_script_error(const QScriptValue &) ));
// process Events every 500 msecs during script execution // process Events every 500 msecs during script execution
scriptEngine_.setProcessEventsInterval( 500 ); scriptEngine_.setProcessEventsInterval( 500 );
...@@ -1771,4 +1773,8 @@ bool Core::checkOpenGLCapabilities() { ...@@ -1771,4 +1773,8 @@ bool Core::checkOpenGLCapabilities() {
return ok; return ok;
} }
void Core::slot_script_error(const QScriptValue &error) {
emit log(LOGERR, tr("Script error: ") + error.toString());
}
//============================================================================= //=============================================================================
...@@ -1223,6 +1223,8 @@ private slots: ...@@ -1223,6 +1223,8 @@ private slots:
void slotGetDescription(QString _function, QString& _fnDescription, void slotGetDescription(QString _function, QString& _fnDescription,
QStringList& _parameters, QStringList& _descriptions ); QStringList& _parameters, QStringList& _descriptions );
void slot_script_error(const QScriptValue &error);
private: private:
QList< SlotInfo > coreSlots_; QList< SlotInfo > coreSlots_;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment