From d75fbe79f064e3ee017764024aac173a7d599583 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 23 Jan 2015 03:04:50 +0200 Subject: ZVISION: Error out when a script file can't be found or be parsed This should be an error, as we've effectively reached a non-existing scene (such as in bug #6780), or we haven't parsed script files of a scene fully, thus unexpected behavior will likely occur --- engines/zvision/scripting/scr_file_handling.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'engines/zvision') diff --git a/engines/zvision/scripting/scr_file_handling.cpp b/engines/zvision/scripting/scr_file_handling.cpp index b9cafa77ed..b047c14430 100644 --- a/engines/zvision/scripting/scr_file_handling.cpp +++ b/engines/zvision/scripting/scr_file_handling.cpp @@ -47,15 +47,13 @@ namespace ZVision { void ScriptManager::parseScrFile(const Common::String &fileName, ScriptScope &scope) { Common::File file; if (!_engine->getSearchManager()->openFile(file, fileName)) { - warning("Script file not found: %s", fileName.c_str()); - return; + error("Script file not found: %s", fileName.c_str()); } while (!file.eos()) { Common::String line = file.readLine(); if (file.err()) { - warning("Error parsing scr file: %s", fileName.c_str()); - return; + error("Error parsing scr file: %s", fileName.c_str()); } trimCommentsAndWhiteSpace(&line); -- cgit v1.2.3