From 95e5f77c61e42267f90a0cf33d360496625d7f2f Mon Sep 17 00:00:00 2001 From: Eshed Date: Tue, 13 Sep 2016 09:29:07 +0300 Subject: [PATCH] Fix #5346 --- rts/System/SpringApp.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rts/System/SpringApp.cpp b/rts/System/SpringApp.cpp index 7ab2efcdc8a..2997f2702cf 100644 --- a/rts/System/SpringApp.cpp +++ b/rts/System/SpringApp.cpp @@ -712,7 +712,11 @@ CGameController* SpringApp::LoadDemoFile(const std::string& demoFile) CGameController* SpringApp::RunScript(const std::string& buf) { - clientSetup->LoadFromStartScript(buf); + try { + clientSetup->LoadFromStartScript(buf); + } catch (const content_error& err) { + throw content_error(std::string("Invalid script file\n") + err.what()); + } if (!clientSetup->demoFile.empty()) return LoadDemoFile(clientSetup->demoFile);