summaryrefslogtreecommitdiff
path: root/src/script/script_scanner.cpp
diff options
context:
space:
mode:
authorglx <glx@openttd.org>2019-05-15 21:14:13 +0200
committerglx22 <glx22@users.noreply.github.com>2019-05-15 21:59:57 +0200
commit09004f36974e841705ccb8c8c02a915601350e8c (patch)
tree05f55454435afc39af529c2836fb46f73b9f4c4f /src/script/script_scanner.cpp
parenta82e7ec281ca08d91bcff129b390a3f58ac308ba (diff)
downloadopenttd-09004f36974e841705ccb8c8c02a915601350e8c.tar.xz
Codechange: catch script exceptions by reference
Diffstat (limited to 'src/script/script_scanner.cpp')
-rw-r--r--src/script/script_scanner.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/script/script_scanner.cpp b/src/script/script_scanner.cpp
index 66dd6dae5..c4205bbc4 100644
--- a/src/script/script_scanner.cpp
+++ b/src/script/script_scanner.cpp
@@ -55,7 +55,7 @@ bool ScriptScanner::AddFile(const char *filename, size_t basepath_length, const
this->ResetEngine();
try {
this->engine->LoadScript(filename);
- } catch (Script_FatalError e) {
+ } catch (Script_FatalError &e) {
DEBUG(script, 0, "Fatal error '%s' when trying to load the script '%s'.", e.GetErrorMessage(), filename);
return false;
}