aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/corelib/language
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@theqtcompany.com>2014-11-28 12:44:27 +0100
committerChristian Kandeler <christian.kandeler@theqtcompany.com>2014-11-28 14:32:51 +0100
commitbe93bcdf9f0c50bcc88557e3f2568568f13ae0bd (patch)
tree9050f4d95757cc8fbd88b0bc71ed670a498b230e /src/lib/corelib/language
parentaa93423145f7ce031be0ddd668a014fb73ba8250 (diff)
Catch exceptions by const reference.
Change-Id: Ib155b1b6f4e5d618d6e3143f43a2e7f9e7e1d410 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Diffstat (limited to 'src/lib/corelib/language')
-rw-r--r--src/lib/corelib/language/scriptengine.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/corelib/language/scriptengine.cpp b/src/lib/corelib/language/scriptengine.cpp
index dd8e4c0db..00d16c989 100644
--- a/src/lib/corelib/language/scriptengine.cpp
+++ b/src/lib/corelib/language/scriptengine.cpp
@@ -399,7 +399,7 @@ QScriptValue ScriptEngine::js_loadExtension(QScriptContext *context, QScriptEngi
}
values << engine->importFile(filePath, QScriptValue());
}
- } catch (ErrorInfo &e) {
+ } catch (const ErrorInfo &e) {
return context->throwError(e.toString());
}
@@ -425,7 +425,7 @@ QScriptValue ScriptEngine::js_loadFile(QScriptContext *context, QScriptEngine *q
const QString filePath = FileInfo::resolvePath(engine->m_currentDirPathStack.top(),
relativeFilePath);
result = engine->importFile(filePath, QScriptValue());
- } catch (ErrorInfo &e) {
+ } catch (const ErrorInfo &e) {
result = context->throwError(e.toString());
}