Fix RegisterRestorer not handling potential throws on register assign
This should fix part of #1214
This commit is contained in:
parent
55bd3b7949
commit
e3a04dfa65
|
@ -1510,8 +1510,15 @@ public:
|
||||||
|
|
||||||
~RegisterRestorer()
|
~RegisterRestorer()
|
||||||
{
|
{
|
||||||
if (m_name != 0)
|
if (m_name != 0) try
|
||||||
|
{
|
||||||
RegisterManager::instance()[m_name] = m_save;
|
RegisterManager::instance()[m_name] = m_save;
|
||||||
|
}
|
||||||
|
catch (runtime_error& e)
|
||||||
|
{
|
||||||
|
write_to_debug_buffer(format("Could not restore register '{}': {}",
|
||||||
|
m_name, e.what()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user