diff options
Diffstat (limited to 'scriptmanager.cpp')
-rw-r--r-- | scriptmanager.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/scriptmanager.cpp b/scriptmanager.cpp index 882839c..00b5b91 100644 --- a/scriptmanager.cpp +++ b/scriptmanager.cpp @@ -150,12 +150,13 @@ void ScriptManager::runFile(const QString &fileName) Core::MessageManager::instance()->showOutputPane(); Core::MessageManager::instance()->printToOutputPane(tr("Start %1...").arg(fileName), Utils::NormalMessageFormat); - if(m_runner->runScript(sourceCode, fileName)) + ErrorMessage message = m_runner->runScript(sourceCode, fileName); + if (message.hasError) + Core::MessageManager::instance()->printToOutputPane(tr("Error at line %1: %2\n").arg(message.line).arg(message.message), + Utils::ErrorMessageFormat); + else Core::MessageManager::instance()->printToOutputPane(tr("The script exited normally\n"), Utils::NormalMessageFormat); - else - Core::MessageManager::instance()->printToOutputPane(tr("The script has unexpectedly finished.\n"), - Utils::ErrorMessageFormat); } else { Core::MessageManager::instance()->printToOutputPane(tr("Error: %1 doesn't exist.\n").arg(fileName), |