* Removal of remaining exceptions

This commit is contained in:
Phillip Stephens 2015-08-29 01:34:22 -07:00
parent 4d13caeaab
commit 1de67f30b8
3 changed files with 259 additions and 287 deletions

View File

@ -40,8 +40,6 @@ SkywardSwordFile* SkywardSwordFileReader::read()
{ {
SkywardSwordFile* file = NULL; SkywardSwordFile* file = NULL;
try
{
if (base::length() != 0xFBE0) if (base::length() != 0xFBE0)
{ {
atError("File not the expected size of 0xFBE0"); atError("File not the expected size of 0xFBE0");
@ -79,13 +77,6 @@ SkywardSwordFile* SkywardSwordFileReader::read()
base::seek(pos, SeekOrigin::Begin); base::seek(pos, SeekOrigin::Begin);
file->addQuest(q); file->addQuest(q);
} }
}
catch (...)
{
delete file;
file = NULL;
throw;
}
return file; return file;
} }

View File

@ -40,8 +40,6 @@ Sakura::SpriteFile* SpriteFileReader::readFile()
{ {
Sakura::SpriteFile* ret = NULL; Sakura::SpriteFile* ret = NULL;
try
{
atUint32 magic = base::readUint32(); atUint32 magic = base::readUint32();
if (magic != Sakura::SpriteFile::Magic) if (magic != Sakura::SpriteFile::Magic)
@ -219,13 +217,6 @@ Sakura::SpriteFile* SpriteFileReader::readFile()
} }
ret->setSprites(sprites); ret->setSprites(sprites);
}
catch (...)
{
delete ret;
ret = NULL;
throw;
}
return ret; return ret;
} }

View File

@ -51,8 +51,6 @@ WiiSave* WiiSaveReader::readSave()
{ {
WiiSave* ret = new WiiSave; WiiSave* ret = new WiiSave;
try
{
if (length() < 0xF0C0) if (length() < 0xF0C0)
{ {
atError("Not a valid WiiSave"); atError("Not a valid WiiSave");
@ -110,14 +108,6 @@ WiiSave* WiiSaveReader::readSave()
ret->setRoot(buildTree(files)); ret->setRoot(buildTree(files));
readCerts(totalSize); readCerts(totalSize);
}
catch (...)
{
delete ret;
ret = NULL;
throw;
}
return ret; return ret;
} }