Ignore:
Timestamp:
12/12/10 03:58:45 (9 years ago)
Author:
technomage
Message:

Patch by Technomage

  • Replaced the test_dialogue.py testsuite with the test_dialogueprocessor.py testsuite and added/updated unittest TestCases? for all public methods of the DialogueProcessor? class.
  • DialogueProcessor? was refactored to be much more liberal about raising exceptions instead of silently handling errors; the code documentation has been updated to describe this new behavior.
  • Refactored exception-handling code in the dialogueparsers.py gamemodel.py modules related to the dialogue engine to deal with the changes to the DialogueProcessor? class.
  • Added a new method to the Dialogue class, getRootSection, which returns the root DialogueSection? for the a particular dialogue; also added some error checking code for inputs to the constructor.
  • Updated the run_tests.py script to import config.py and attempt to read the FIFE Python module path from it, just like run.py.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/game/scripts/gamemodel.py

    r669 r685  
    744744                try: 
    745745                    dialogue = dialogue_parser.load(dialogue_file) 
    746                 except DialogueFormatError as error: 
     746                except (DialogueFormatError,) as error: 
    747747                    logging.error('unable to load dialogue file {0}: {1}' 
    748748                                  .format(dialogue_filepath, error)) 
Note: See TracChangeset for help on using the changeset viewer.