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/dialogueparsers.py

    r683 r685  
    121121        """ 
    122122        loader = loader_class(stream) 
    123         dialogue = self._constructDialogue(loader, loader.get_single_node()) 
     123        try: 
     124            dialogue = \ 
     125                self._constructDialogue(loader, loader.get_single_node()) 
     126        except (AssertionError,) as error: 
     127            raise DialogueFormatError(str(error)) 
    124128        return dialogue 
    125129     
Note: See TracChangeset for help on using the changeset viewer.