diff options
author | Filippos Karapetis | 2015-01-23 03:04:50 +0200 |
---|---|---|
committer | Filippos Karapetis | 2015-01-23 03:04:50 +0200 |
commit | d75fbe79f064e3ee017764024aac173a7d599583 (patch) | |
tree | 5d1b70c79bdcbd4dba465b44f157ce2756d9000c /engines | |
parent | 1bd83a96f00c4d25cf4060ba8faffda81865ad7d (diff) | |
download | scummvm-rg350-d75fbe79f064e3ee017764024aac173a7d599583.tar.gz scummvm-rg350-d75fbe79f064e3ee017764024aac173a7d599583.tar.bz2 scummvm-rg350-d75fbe79f064e3ee017764024aac173a7d599583.zip |
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
Diffstat (limited to 'engines')
-rw-r--r-- | engines/zvision/scripting/scr_file_handling.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
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); |