Subversion Repositories public iLand

Rev

Rev 294 | Rev 321 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 294 Rev 295
Line 54... Line 54...
54
QString Management::executeScript(QString cmd)
54
QString Management::executeScript(QString cmd)
55
{
55
{
56
    DebugTimer t("execute javascript");
56
    DebugTimer t("execute javascript");
57
    if (mEngine)
57
    if (mEngine)
58
        mEngine->evaluate(cmd);
58
        mEngine->evaluate(cmd);
59
    if (mEngine->hasUncaughtException())
-
 
60
        return QString( "Script Error occured: %1").arg( mEngine->uncaughtException().toString());
-
 
61
    else
-
 
-
 
59
    if (mEngine->hasUncaughtException()) {
-
 
60
        int line = mEngine->uncaughtExceptionLineNumber();
-
 
61
        QString msg = QString( "Script Error occured: %1\n").arg( mEngine->uncaughtException().toString());
-
 
62
        msg+=mEngine->uncaughtExceptionBacktrace().join("\n");
-
 
63
        return msg;
-
 
64
    } else {
62
        return QString();
65
        return QString();
-
 
66
    }
63
}
67
}
64
68
65
Management::Management()
69
Management::Management()
66
{
70
{
67
    // setup the engine
71
    // setup the engine