From e88db2e2d5b7b6d9dd2cff8414defa956dba3fe7 Mon Sep 17 00:00:00 2001 From: Melefo <42809472+Melefo@users.noreply.github.com> Date: Thu, 11 Feb 2021 14:24:31 +0100 Subject: [PATCH] Throwing runtime error when MemoryMap is inaccessible instead of InvalidAddress --- sources/APU/DSP/DSP.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/APU/DSP/DSP.cpp b/sources/APU/DSP/DSP.cpp index 781684b..fb933c9 100644 --- a/sources/APU/DSP/DSP.cpp +++ b/sources/APU/DSP/DSP.cpp @@ -571,7 +571,7 @@ namespace ComSquare::APU::DSP uint8_t DSP::_readRAM(uint24_t addr) { if (!this->_map.lock()) - throw InvalidAddress("DSP read", addr); + throw std::runtime_error("DSP read : MemoryMap inaccessible"); switch (addr) { case 0x0000 ... 0x00EF: return this->_map.lock()->Page0.read(addr); @@ -589,7 +589,7 @@ namespace ComSquare::APU::DSP void DSP::_writeRAM(uint24_t addr, uint8_t data) { if (!this->_map.lock()) - throw InvalidAddress("DSP write", addr); + throw std::runtime_error("DSP write : MemoryMap inaccessible"); switch (addr) { case 0x0000 ... 0x00EF: this->_map.lock()->Page0.write(addr, data);