Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#234 closed defect (released)

Invalid data file doesn't stop load

Reported by: ibboard Owned by: ibboard
Priority: critical Milestone: WarFoundry 0.1
Component: WarFoundry-GUI-WinForms Version: Trunk
Keywords: datafile load race exception Cc:
Blocked By: Blocking:

Description

If a data file is invalid in such a way that it is only picked up when loading the remaining data (e.g. an invalid attribute value that triggers an InvalidFileException) then WarFoundry still behaves as if the file was loaded, even though the file itself contains no extra data.

This shouldn't happen as the file may only be partially loaded - invalid files should be removed from the list and armies shouldn't be created for invalid races.

Change History (5)

comment:1 Changed 10 years ago by ibboard

Owner: set to ibboard
Status: newaccepted

comment:2 Changed 10 years ago by ibboard

(In r432) Re #234: Invalid data file doesn't stop load

  • Add internal methods to remove game systems or races that fail to load
  • Add error handling on XML CompleteLoading so that game system or race is removed, but make sure not to affect error

comment:3 Changed 10 years ago by ibboard

Resolution: fixed
Status: acceptedclosed

(In r433) Fixes #234: Invalid data file doesn't stop load

  • Refactor army change code
    • Only set CurrentArmy value once we know it is safe and properly loaded
    • Separate out smaller methods with sensible names
    • Make CurrentGameSystem and CurrentArmy non-static

Also:

  • Use parameter in FrmNewArmy constructor instead of ignoring it

comment:4 Changed 10 years ago by ibboard

released: noyes

Release as part of v0.1b6

comment:5 Changed 10 years ago by ibboard

Resolution: fixedreleased

Mark fix as released under a previous version

Note: See TracTickets for help on using tickets.