Now that the Serializer class throws exceptions differently,

we need to modify what is caught.  Ironically enough, this fixes
a bug whereby when certain errors occur, the recovery system
itself would crash, not the issue that actually caused the bug!


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2499 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
stephena 2012-05-25 12:41:19 +00:00
parent 3375cb9f98
commit feac57253e
37 changed files with 154 additions and 157 deletions

View File

@ -406,11 +406,9 @@ bool SoundSDL::save(Serializer& out) const
out.putInt(myLastRegisterSetCycle);
}
catch(const char* msg)
catch(...)
{
ostringstream buf;
buf << "ERROR: SoundSDL::save" << endl << " " << msg << endl;
myOSystem->logMessage(buf.str(), 0);
myOSystem->logMessage("ERROR: SoundSDL::save", 0);
return false;
}
@ -449,11 +447,9 @@ bool SoundSDL::load(Serializer& in)
if(!myIsMuted) SDL_PauseAudio(0);
}
}
catch(const char* msg)
catch(...)
{
ostringstream buf;
buf << "ERROR: SoundSDL::load" << endl << " " << msg << endl;
myOSystem->logMessage(buf.str(), 0);
myOSystem->logMessage("ERROR: SoundSDL::load", 0);
return false;
}

View File

@ -200,9 +200,9 @@ bool Cartridge0840::save(Serializer& out) const
out.putString(name());
out.putShort(myCurrentBank);
}
catch(const char* msg)
catch(...)
{
cerr << "ERROR: Cartridge0840::save" << endl << " " << msg << endl;
cerr << "ERROR: Cartridge0840::save" << endl;
return false;
}
@ -219,9 +219,9 @@ bool Cartridge0840::load(Serializer& in)
myCurrentBank = in.getShort();
}
catch(const char* msg)
catch(...)
{
cerr << "ERROR: Cartridge0840::load" << endl << " " << msg << endl;
cerr << "ERROR: Cartridge0840::load" << endl;
return false;
}

View File

@ -141,9 +141,9 @@ bool Cartridge2K::save(Serializer& out) const
{
out.putString(name());
}
catch(const char* msg)
catch(...)
{
cerr << "ERROR: Cartridge2K::save" << endl << " " << msg << endl;
cerr << "ERROR: Cartridge2K::save" << endl;
return false;
}
@ -158,9 +158,9 @@ bool Cartridge2K::load(Serializer& in)
if(in.getString() != name())
return false;
}
catch(const char* msg)
catch(...)
{
cerr << "ERROR: Cartridge2K::load" << endl << " " << msg << endl;
cerr << "ERROR: Cartridge2K::load" << endl;
return false;
}

View File

@ -277,9 +277,9 @@ bool Cartridge3E::save(Serializer& out) const
out.putShort(myCurrentBank);
out.putByteArray(myRAM, 32768);
}
catch(const char* msg)
catch(...)
{
cerr << "ERROR: Cartridge3E::save" << endl << " " << msg << endl;
cerr << "ERROR: Cartridge3E::save" << endl;
return false;
}
@ -297,9 +297,9 @@ bool Cartridge3E::load(Serializer& in)
myCurrentBank = in.getShort();
in.getByteArray(myRAM, 32768);
}
catch(const char* msg)
catch(...)
{
cerr << "ERROR: Cartridge3E::load" << endl << " " << msg << endl;
cerr << "ERROR: Cartridge3E::load" << endl;
return false;
}

View File

@ -194,9 +194,9 @@ bool Cartridge3F::save(Serializer& out) const
out.putString(name());
out.putShort(myCurrentBank);
}
catch(const char* msg)
catch(...)
{
cerr << "ERROR: Cartridge3F::save" << endl << " " << msg << endl;
cerr << "ERROR: Cartridge3F::save" << endl;
return false;
}
@ -213,9 +213,9 @@ bool Cartridge3F::load(Serializer& in)
myCurrentBank = in.getShort();
}
catch(const char* msg)
catch(...)
{
cerr << "ERROR: Cartridge3F::load" << endl << " " << msg << endl;
cerr << "ERROR: Cartridge3F::load" << endl;
return false;
}

View File

@ -468,9 +468,9 @@ bool Cartridge4A50::save(Serializer& out) const
out.putByte(myLastData);
out.putShort(myLastAddress);
}
catch(const char* msg)
catch(...)
{
cerr << "ERROR: Cartridge4A40::save" << endl << " " << msg << endl;
cerr << "ERROR: Cartridge4A40::save" << endl;
return false;
}
@ -501,9 +501,9 @@ bool Cartridge4A50::load(Serializer& in)
myLastData = in.getByte();
myLastAddress = in.getShort();
}
catch(const char* msg)
catch(...)
{
cerr << "ERROR: Cartridge4A50::load" << endl << " " << msg << endl;
cerr << "ERROR: Cartridge4A50::load" << endl;
return false;
}

View File

@ -118,9 +118,9 @@ bool Cartridge4K::save(Serializer& out) const
{
out.putString(name());
}
catch(const char* msg)
catch(...)
{
cerr << "ERROR: Cartridge4K::save" << endl << " " << msg << endl;
cerr << "ERROR: Cartridge4K::save" << endl;
return false;
}
@ -135,9 +135,9 @@ bool Cartridge4K::load(Serializer& in)
if(in.getString() != name())
return false;
}
catch(const char* msg)
catch(...)
{
cerr << "ERROR: Cartridge4K::load" << endl << " " << msg << endl;
cerr << "ERROR: Cartridge4K::load" << endl;
return false;
}

View File

@ -503,9 +503,9 @@ bool CartridgeAR::save(Serializer& out) const
// Indicates if a write is pending or not
out.putBool(myWritePending);
}
catch(const char* msg)
catch(...)
{
cerr << "ERROR: CartridgeAR::save" << endl << " " << msg << endl;
cerr << "ERROR: CartridgeAR::save" << endl;
return false;
}
@ -554,9 +554,9 @@ bool CartridgeAR::load(Serializer& in)
// Indicates if a write is pending or not
myWritePending = in.getBool();
}
catch(const char* msg)
catch(...)
{
cerr << "ERROR: CartridgeAR::load" << endl << " " << msg << endl;
cerr << "ERROR: CartridgeAR::load" << endl;
return false;
}

View File

@ -207,9 +207,9 @@ bool CartridgeCM::save(Serializer& out) const
out.putByte(myColumn);
out.putByteArray(myRAM, 2048);
}
catch(const char* msg)
catch(...)
{
cerr << "ERROR: CartridgeCM::save" << endl << " " << msg << endl;
cerr << "ERROR: CartridgeCM::save" << endl;
return false;
}
@ -229,9 +229,9 @@ bool CartridgeCM::load(Serializer& in)
myColumn = in.getByte();
in.getByteArray(myRAM, 2048);
}
catch(const char* msg)
catch(...)
{
cerr << "ERROR: CartridgeCM::load" << endl << " " << msg << endl;
cerr << "ERROR: CartridgeCM::load" << endl;
return false;
}

View File

@ -321,9 +321,9 @@ bool CartridgeCTY::save(Serializer& out) const
out.putInt((uInt32)(myFractionalClocks * 100000000.0));
}
catch(const char* msg)
catch(...)
{
cerr << "ERROR: CartridgeCTY::save" << endl << " " << msg << endl;
cerr << "ERROR: CartridgeCTY::save" << endl;
return false;
}
@ -349,9 +349,9 @@ bool CartridgeCTY::load(Serializer& in)
mySystemCycles = (Int32)in.getInt();
myFractionalClocks = (double)in.getInt() / 100000000.0;
}
catch(const char* msg)
catch(...)
{
cerr << "ERROR: CartridgeCTY::load" << endl << " " << msg << endl;
cerr << "ERROR: CartridgeCTY::load" << endl;
return false;
}
return true;
@ -522,7 +522,7 @@ void CartridgeCTY::wipeAllScores()
{
serializer.putByteArray(scoreRAM, 256);
}
catch(const char* msg)
catch(...)
{
// Maybe add logging here that save failed?
cerr << name() << ": ERROR wiping score tables" << endl;

View File

@ -206,9 +206,9 @@ bool CartridgeCV::save(Serializer& out) const
out.putString(name());
out.putByteArray(myRAM, 1024);
}
catch(const char* msg)
catch(...)
{
cerr << "ERROR: CartridgeCV::save" << endl << " " << msg << endl;
cerr << "ERROR: CartridgeCV::save" << endl;
return false;
}
@ -225,9 +225,9 @@ bool CartridgeCV::load(Serializer& in)
in.getByteArray(myRAM, 1024);
}
catch(const char* msg)
catch(...)
{
cerr << "ERROR: CartridgeCV::load" << endl << " " << msg << endl;
cerr << "ERROR: CartridgeCV::load" << endl;
return false;
}

View File

@ -504,9 +504,9 @@ bool CartridgeDPC::save(Serializer& out) const
out.putInt(mySystemCycles);
out.putInt((uInt32)(myFractionalClocks * 100000000.0));
}
catch(const char* msg)
catch(...)
{
cerr << "ERROR: CartridgeDPC::save" << endl << " " << msg << endl;
cerr << "ERROR: CartridgeDPC::save" << endl;
return false;
}
@ -547,9 +547,9 @@ bool CartridgeDPC::load(Serializer& in)
mySystemCycles = (Int32)in.getInt();
myFractionalClocks = (double)in.getInt() / 100000000.0;
}
catch(const char* msg)
catch(...)
{
cerr << "ERROR: CartridgeDPC::load" << endl << " " << msg << endl;
cerr << "ERROR: CartridgeDPC::load" << endl;
return false;
}

View File

@ -698,9 +698,9 @@ bool CartridgeDPCPlus::save(Serializer& out) const
out.putInt(mySystemCycles);
out.putInt((uInt32)(myFractionalClocks * 100000000.0));
}
catch(const char* msg)
catch(...)
{
cerr << "ERROR: CartridgeDPCPlus::save" << endl << " " << msg << endl;
cerr << "ERROR: CartridgeDPCPlus::save" << endl;
return false;
}
@ -756,9 +756,9 @@ bool CartridgeDPCPlus::load(Serializer& in)
mySystemCycles = (Int32)in.getInt();
myFractionalClocks = (double)in.getInt() / 100000000.0;
}
catch(const char* msg)
catch(...)
{
cerr << "ERROR: CartridgeDPCPlus::load" << endl << " " << msg << endl;
cerr << "ERROR: CartridgeDPCPlus::load" << endl;
return false;
}

View File

@ -237,9 +237,9 @@ bool CartridgeE0::save(Serializer& out) const
out.putString(name());
out.putShortArray(myCurrentSlice, 4);
}
catch(const char* msg)
catch(...)
{
cerr << "ERROR: CartridgeE0::save" << endl << " " << msg << endl;
cerr << "ERROR: CartridgeE0::save" << endl;
return false;
}
@ -256,9 +256,9 @@ bool CartridgeE0::load(Serializer& in)
in.getShortArray(myCurrentSlice, 4);
}
catch(const char* msg)
catch(...)
{
cerr << "ERROR: CartridgeE0::load" << endl << " " << msg << endl;
cerr << "ERROR: CartridgeE0::load" << endl;
return false;
}

View File

@ -305,9 +305,9 @@ bool CartridgeE7::save(Serializer& out) const
out.putShort(myCurrentRAM);
out.putByteArray(myRAM, 2048);
}
catch(const char* msg)
catch(...)
{
cerr << "ERROR: CartridgeE7::save" << endl << " " << msg << endl;
cerr << "ERROR: CartridgeE7::save" << endl;
return false;
}
@ -326,9 +326,9 @@ bool CartridgeE7::load(Serializer& in)
myCurrentRAM = in.getShort();
in.getByteArray(myRAM, 2048);
}
catch(const char* msg)
catch(...)
{
cerr << "ERROR: CartridgeE7::load" << endl << " " << msg << endl;
cerr << "ERROR: CartridgeE7::load" << endl;
return false;
}

View File

@ -148,9 +148,9 @@ bool CartridgeEF::save(Serializer& out) const
out.putString(name());
out.putShort(myCurrentBank);
}
catch(const char* msg)
catch(...)
{
cerr << "ERROR: CartridgeEF::save" << endl << " " << msg << endl;
cerr << "ERROR: CartridgeEF::save" << endl;
return false;
}
@ -167,9 +167,9 @@ bool CartridgeEF::load(Serializer& in)
myCurrentBank = in.getShort();
}
catch(const char* msg)
catch(...)
{
cerr << "ERROR: CartridgeEF::load" << endl << " " << msg << endl;
cerr << "ERROR: CartridgeEF::load" << endl;
return false;
}

View File

@ -211,9 +211,9 @@ bool CartridgeEFSC::save(Serializer& out) const
out.putShort(myCurrentBank);
out.putByteArray(myRAM, 128);
}
catch(const char* msg)
catch(...)
{
cerr << "ERROR: CartridgeEFSC::save" << endl << " " << msg << endl;
cerr << "ERROR: CartridgeEFSC::save" << endl;
return false;
}
@ -231,9 +231,9 @@ bool CartridgeEFSC::load(Serializer& in)
myCurrentBank = in.getShort();
in.getByteArray(myRAM, 128);
}
catch(const char* msg)
catch(...)
{
cerr << "ERROR: CartridgeEFSC::load" << endl << " " << msg << endl;
cerr << "ERROR: CartridgeEFSC::load" << endl;
return false;
}

View File

@ -162,9 +162,9 @@ bool CartridgeF0::save(Serializer& out) const
out.putString(name());
out.putShort(myCurrentBank);
}
catch(const char* msg)
catch(...)
{
cerr << "ERROR: CartridgeF0::save" << endl << " " << msg << endl;
cerr << "ERROR: CartridgeF0::save" << endl;
return false;
}
@ -181,9 +181,9 @@ bool CartridgeF0::load(Serializer& in)
myCurrentBank = in.getShort();
}
catch(const char* msg)
catch(...)
{
cerr << "ERROR: CartridgeF0::load" << endl << " " << msg << endl;
cerr << "ERROR: CartridgeF0::load" << endl;
return false;
}

View File

@ -153,9 +153,9 @@ bool CartridgeF4::save(Serializer& out) const
out.putString(name());
out.putShort(myCurrentBank);
}
catch(const char* msg)
catch(...)
{
cerr << "ERROR: CartridgeF4::save" << endl << " " << msg << endl;
cerr << "ERROR: CartridgeF4::save" << endl;
return false;
}
@ -172,9 +172,9 @@ bool CartridgeF4::load(Serializer& in)
myCurrentBank = in.getShort();
}
catch(const char* msg)
catch(...)
{
cerr << "ERROR: CartridgeF4::load" << endl << " " << msg << endl;
cerr << "ERROR: CartridgeF4::load" << endl;
return false;
}

View File

@ -214,9 +214,9 @@ bool CartridgeF4SC::save(Serializer& out) const
out.putShort(myCurrentBank);
out.putByteArray(myRAM, 128);
}
catch(const char* msg)
catch(...)
{
cerr << "ERROR: CartridgeF4SC::save" << endl << " " << msg << endl;
cerr << "ERROR: CartridgeF4SC::save" << endl;
return false;
}
@ -234,9 +234,9 @@ bool CartridgeF4SC::load(Serializer& in)
myCurrentBank = in.getShort();
in.getByteArray(myRAM, 128);
}
catch(const char* msg)
catch(...)
{
cerr << "ERROR: CartridgeF4SC::load" << endl << " " << msg << endl;
cerr << "ERROR: CartridgeF4SC::load" << endl;
return false;
}

View File

@ -193,9 +193,9 @@ bool CartridgeF6::save(Serializer& out) const
out.putString(name());
out.putShort(myCurrentBank);
}
catch(const char* msg)
catch(...)
{
cerr << "ERROR: CartridgeF6::save" << endl << " " << msg << endl;
cerr << "ERROR: CartridgeF6::save" << endl;
return false;
}
@ -212,9 +212,9 @@ bool CartridgeF6::load(Serializer& in)
myCurrentBank = in.getShort();
}
catch(const char* msg)
catch(...)
{
cerr << "ERROR: CartridgeF6::load" << endl << " " << msg << endl;
cerr << "ERROR: CartridgeF6::load" << endl;
return false;
}

View File

@ -257,9 +257,9 @@ bool CartridgeF6SC::save(Serializer& out) const
out.putShort(myCurrentBank);
out.putByteArray(myRAM, 128);
}
catch(const char* msg)
catch(...)
{
cerr << "ERROR: CartridgeF6SC::save" << endl << " " << msg << endl;
cerr << "ERROR: CartridgeF6SC::save" << endl;
return false;
}
@ -277,9 +277,9 @@ bool CartridgeF6SC::load(Serializer& in)
myCurrentBank = in.getShort();
in.getByteArray(myRAM, 128);
}
catch(const char* msg)
catch(...)
{
cerr << "ERROR: CartridgeF6SC::load" << endl << " " << msg << endl;
cerr << "ERROR: CartridgeF6SC::load" << endl;
return false;
}

View File

@ -180,9 +180,9 @@ bool CartridgeF8::save(Serializer& out) const
out.putString(name());
out.putShort(myCurrentBank);
}
catch(const char* msg)
catch(...)
{
cerr << "ERROR: CartridgeF8::save" << endl << " " << msg << endl;
cerr << "ERROR: CartridgeF8::save" << endl;
return false;
}
@ -199,9 +199,9 @@ bool CartridgeF8::load(Serializer& in)
myCurrentBank = in.getShort();
}
catch(const char* msg)
catch(...)
{
cerr << "ERROR: CartridgeF8SC::load" << endl << " " << msg << endl;
cerr << "ERROR: CartridgeF8SC::load" << endl;
return false;
}

View File

@ -237,9 +237,9 @@ bool CartridgeF8SC::save(Serializer& out) const
out.putShort(myCurrentBank);
out.putByteArray(myRAM, 128);
}
catch(const char* msg)
catch(...)
{
cerr << "ERROR: CartridgeF8SC::save" << endl << " " << msg << endl;
cerr << "ERROR: CartridgeF8SC::save" << endl;
return false;
}
@ -257,9 +257,9 @@ bool CartridgeF8SC::load(Serializer& in)
myCurrentBank = in.getShort();
in.getByteArray(myRAM, 128);
}
catch(const char* msg)
catch(...)
{
cerr << "ERROR: CartridgeF8SC::load" << endl << " " << msg << endl;
cerr << "ERROR: CartridgeF8SC::load" << endl;
return false;
}

View File

@ -247,9 +247,9 @@ bool CartridgeFA::save(Serializer& out) const
out.putShort(myCurrentBank);
out.putByteArray(myRAM, 256);
}
catch(const char* msg)
catch(...)
{
cerr << "ERROR: CartridgeFA::save" << endl << " " << msg << endl;
cerr << "ERROR: CartridgeFA::save" << endl;
return false;
}
@ -267,9 +267,9 @@ bool CartridgeFA::load(Serializer& in)
myCurrentBank = in.getShort();
in.getByteArray(myRAM, 256);
}
catch(const char* msg)
catch(...)
{
cerr << "ERROR: CartridgeFA::load" << endl << " " << msg << endl;
cerr << "ERROR: CartridgeFA::load" << endl;
return false;
}

View File

@ -310,9 +310,9 @@ bool CartridgeFA2::save(Serializer& out) const
out.putShort(myCurrentBank);
out.putByteArray(myRAM, 256);
}
catch(const char* msg)
catch(...)
{
cerr << "ERROR: CartridgeFA2::save" << endl << " " << msg << endl;
cerr << "ERROR: CartridgeFA2::save" << endl;
return false;
}
@ -330,9 +330,9 @@ bool CartridgeFA2::load(Serializer& in)
myCurrentBank = in.getShort();
in.getByteArray(myRAM, 256);
}
catch(const char* msg)
catch(...)
{
cerr << "ERROR: CartridgeFA2::load" << endl << " " << msg << endl;
cerr << "ERROR: CartridgeFA2::load" << endl;
return false;
}
@ -386,7 +386,7 @@ uInt8 CartridgeFA2::ramReadWrite()
{
serializer.getByteArray(myRAM, 256);
}
catch(const char* msg)
catch(...)
{
memset(myRAM, 0, 256);
}
@ -398,9 +398,10 @@ uInt8 CartridgeFA2::ramReadWrite()
{
serializer.putByteArray(myRAM, 256);
}
catch(const char* msg)
catch(...)
{
// Maybe add logging here that save failed?
cerr << name() << ": ERROR saving score table" << endl;
}
myRamAccessTimeout += 101000; // Add 101 ms delay for write
}

View File

@ -167,9 +167,9 @@ bool CartridgeFE::save(Serializer& out) const
out.putShort(myLastAddress1);
out.putShort(myLastAddress2);
}
catch(const char* msg)
catch(...)
{
cerr << "ERROR: CartridgeFE::save" << endl << " " << msg << endl;
cerr << "ERROR: CartridgeFE::save" << endl;
return false;
}
@ -187,9 +187,9 @@ bool CartridgeFE::load(Serializer& in)
myLastAddress1 = in.getShort();
myLastAddress2 = in.getShort();
}
catch(const char* msg)
catch(...)
{
cerr << "ERROR: CartridgeF8SC::load" << endl << " " << msg << endl;
cerr << "ERROR: CartridgeF8SC::load" << endl;
return false;
}

View File

@ -257,9 +257,9 @@ bool CartridgeMC::save(Serializer& out) const
// The 32K of RAM
out.putByteArray(myRAM, 32 * 1024);
}
catch(const char* msg)
catch(...)
{
cerr << "ERROR: CartridgeMC::save" << endl << " " << msg << endl;
cerr << "ERROR: CartridgeMC::save" << endl;
return false;
}
@ -280,9 +280,9 @@ bool CartridgeMC::load(Serializer& in)
// The 32K of RAM
in.getByteArray(myRAM, 32 * 1024);
}
catch(const char* msg)
catch(...)
{
cerr << "ERROR: CartridgeMC::load" << endl << " " << msg << endl;
cerr << "ERROR: CartridgeMC::load" << endl;
return false;
}

View File

@ -180,9 +180,9 @@ bool CartridgeSB::save(Serializer& out) const
out.putString(name());
out.putShort(myCurrentBank);
}
catch(const char* msg)
catch(...)
{
cerr << "ERROR: CartridgeSB::save" << endl << " " << msg << endl;
cerr << "ERROR: CartridgeSB::save" << endl;
return false;
}
@ -199,9 +199,9 @@ bool CartridgeSB::load(Serializer& in)
myCurrentBank = in.getShort();
}
catch(const char* msg)
catch(...)
{
cerr << "ERROR: CartridgeSB::load" << endl << " " << msg << endl;
cerr << "ERROR: CartridgeSB::load" << endl;
return false;
}

View File

@ -188,9 +188,9 @@ bool CartridgeUA::save(Serializer& out) const
out.putString(name());
out.putShort(myCurrentBank);
}
catch(const char* msg)
catch(...)
{
cerr << "ERROR: CartridgeUA::save" << endl << " " << msg << endl;
cerr << "ERROR: CartridgeUA::save" << endl;
return false;
}
@ -207,9 +207,9 @@ bool CartridgeUA::load(Serializer& in)
myCurrentBank = in.getShort();
}
catch(const char* msg)
catch(...)
{
cerr << "ERROR: CartridgeUA::load" << endl << " " << msg << endl;
cerr << "ERROR: CartridgeUA::load" << endl;
return false;
}

View File

@ -172,9 +172,9 @@ bool CartridgeX07::save(Serializer& out) const
out.putString(name());
out.putShort(myCurrentBank);
}
catch(const char* msg)
catch(...)
{
cerr << "ERROR: CartridgeX07::save" << endl << " " << msg << endl;
cerr << "ERROR: CartridgeX07::save" << endl;
return false;
}
@ -191,9 +191,9 @@ bool CartridgeX07::load(Serializer& in)
myCurrentBank = in.getShort();
}
catch(const char* msg)
catch(...)
{
cerr << "ERROR: CartridgeX07::load" << endl << " " << msg << endl;
cerr << "ERROR: CartridgeX07::load" << endl;
return false;
}

View File

@ -242,9 +242,9 @@ bool Console::save(Serializer& out) const
mySwitches->save(out)))
return false;
}
catch(const char* msg)
catch(...)
{
cerr << "ERROR: Console::save" << endl << " " << msg << endl;
cerr << "ERROR: Console::save" << endl;
return false;
}
@ -265,9 +265,9 @@ bool Console::load(Serializer& in)
mySwitches->load(in)))
return false;
}
catch(const char* msg)
catch(...)
{
cerr << "ERROR: Console::load" << endl << " " << msg << endl;
cerr << "ERROR: Console::load" << endl;
return false;
}

View File

@ -405,9 +405,9 @@ bool M6502::save(Serializer& out) const
out.putShort(myLastSrcAddressY);
out.putShort(myDataAddressForPoke);
}
catch(const char* msg)
catch(...)
{
cerr << "ERROR: M6502::save" << endl << " " << msg << endl;
cerr << "ERROR: M6502::save" << endl;
return false;
}
@ -453,9 +453,9 @@ bool M6502::load(Serializer& in)
myLastSrcAddressY = in.getShort();
myDataAddressForPoke = in.getShort();
}
catch(const char* msg)
catch(...)
{
cerr << "ERROR: M6502::laod" << endl << " " << msg << endl;
cerr << "ERROR: M6502::laod" << endl;
return false;
}

View File

@ -315,9 +315,9 @@ bool M6532::save(Serializer& out) const
out.putByte(myOutB);
out.putByteArray(myOutTimer, 4);
}
catch(const char* msg)
catch(...)
{
cerr << "ERROR: M6532::save" << endl << " " << msg << endl;
cerr << "ERROR: M6532::save" << endl;
return false;
}
@ -347,9 +347,9 @@ bool M6532::load(Serializer& in)
myOutB = in.getByte();
in.getByteArray(myOutTimer, 4);
}
catch(const char* msg)
catch(...)
{
cerr << "ERROR: M6532::load" << endl << " " << msg << endl;
cerr << "ERROR: M6532::load" << endl;
return false;
}

View File

@ -314,9 +314,9 @@ bool StateManager::saveState(Serializer& out)
}
}
}
catch(const char* msg)
catch(...)
{
cerr << "ERROR: StateManager::saveState(Serializer&)" << endl << " " << msg << endl;
cerr << "ERROR: StateManager::saveState(Serializer&)" << endl;
}
return false;
}

View File

@ -321,9 +321,9 @@ bool System::save(Serializer& out) const
if(!myDevices[i]->save(out))
return false;
}
catch(const char* msg)
catch(...)
{
cerr << "ERROR: System::save" << endl << " " << msg << endl;
cerr << "ERROR: System::save" << endl;
return false;
}
@ -350,9 +350,9 @@ bool System::load(Serializer& in)
if(!myDevices[i]->load(in))
return false;
}
catch(const char* msg)
catch(...)
{
cerr << "ERROR: System::load" << endl << " " << msg << endl;
cerr << "ERROR: System::load" << endl;
return false;
}

View File

@ -356,9 +356,9 @@ bool TIA::save(Serializer& out) const
// Save the sound sample stuff ...
mySound.save(out);
}
catch(const char* msg)
catch(...)
{
cerr << "ERROR: TIA::save" << endl << " " << msg << endl;
cerr << "ERROR: TIA::save" << endl;
return false;
}
@ -464,9 +464,9 @@ bool TIA::load(Serializer& in)
toggleFixedColors(0);
myAllowHMOVEBlanks = true;
}
catch(const char* msg)
catch(...)
{
cerr << "ERROR: TIA::load" << endl << " " << msg << endl;
cerr << "ERROR: TIA::load" << endl;
return false;
}
@ -482,9 +482,9 @@ bool TIA::saveDisplay(Serializer& out) const
out.putInt(myFramePointerClocks);
out.putByteArray(myCurrentFrameBuffer, 160*320);
}
catch(const char* msg)
catch(...)
{
cerr << "ERROR: TIA::saveDisplay" << endl << " " << msg << endl;
cerr << "ERROR: TIA::saveDisplay" << endl;
return false;
}
@ -510,9 +510,9 @@ bool TIA::loadDisplay(Serializer& in)
if(myPartialFrameFlag)
myFramePointer += myFramePointerClocks;
}
catch(const char* msg)
catch(...)
{
cerr << "ERROR: TIA::loadDisplay" << endl << " " << msg << endl;
cerr << "ERROR: TIA::loadDisplay" << endl;
return false;
}