COMMON: Rename Error to ErrorCode, introduce new Error class

This commit is contained in:
Max Horn 2011-04-18 17:39:31 +02:00
parent e9c228564a
commit 73f04118f3
22 changed files with 131 additions and 79 deletions

View file

@ -3547,7 +3547,10 @@ void SceneHandler::dispatch() {
if (_saveGameSlot != -1) {
int saveSlot = _saveGameSlot;
_saveGameSlot = -1;
if (_saver->save(saveSlot, _saveName) != Common::kNoError)
Common::Error err = _saver->save(saveSlot, _saveName);
// FIXME: Make use of the description string in err to enhance
// the error reported to the user.
if (err.getCode() != Common::kNoError)
GUIErrorMessage(SAVE_ERROR_MSG);
}
if (_loadGameSlot != -1) {