On Thursday 15. October 2009 18.30.10 ext Olivier Goffart wrote:
> On Thursday 15 October 2009 15:24:05 Frank Hemer wrote:
> > With 4.6, QScriptValue::call only sets QScriptValue::isError on the
> >  returned object. This used to work with 4.5
[snip]
> But in this particular case, I don't really understand the difference.  Do
>  you have a small code sample that show the behavior change?
> 
> Thanks.
> 
[add]
> ----------  Forwarded Message  ----------
> 
> Subject: Re: [Qt4-preview-feedback] 4.6: QScriptContext::TypeError does not
> set QScriptEngine::hasUncaughtException
> Date: Thursday 15 October 2009
> From: Frank Hemer <[email protected]>
> To: Olivier Goffart <[email protected]>
[snip] 
> Up to now I caught all kind of errors with help of a QScriptEngineAgent:
> 
> void QScriptEngineAgent::functionExit (qint64, const QScriptValue &
> scriptValue) {
>          if (m_scriptEngine->hasUncaughtException ()) {
>             emit error (scriptValue.toString (),
> m_scriptEngineAgent->m_lineNumber, m_scriptEngineAgent->m_columnNumber);
>          }
> }
> 
> Now when calling:
> 
> QScriptValue scriptValue = QScriptValue (m_scriptEngine->globalObject
> ().property ("init")).call ();
> 
> my error is no more emited and QScriptEngine::hasUncaughtException ()
>  returns false.
> 
> The Script I tested this with:
> 
> qs:
> function init () {
> 
>    Unknown.doSth ();
> 
> }
> 
> Frank
> 
> -------------------------------------------------------

Hi,
  It is a bug in the QtScript module and I can reproduce it.
Thank you for your feedback,
  Jedrek
_______________________________________________
Qt4-preview-feedback mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt4-preview-feedback

Reply via email to