mirror of
https://github.com/holub/mame
synced 2025-06-21 03:36:33 +03:00
improved exception handling in running_machine::run() (nw)
This commit is contained in:
parent
d96d215cec
commit
665bf49d7a
@ -442,11 +442,6 @@ int running_machine::run(bool firstrun)
|
|||||||
mame_printf_error("Caught unhandled emulator exception\n");
|
mame_printf_error("Caught unhandled emulator exception\n");
|
||||||
error = MAMERR_FATALERROR;
|
error = MAMERR_FATALERROR;
|
||||||
}
|
}
|
||||||
catch (std::bad_alloc &)
|
|
||||||
{
|
|
||||||
mame_printf_error("Out of memory!\n");
|
|
||||||
error = MAMERR_FATALERROR;
|
|
||||||
}
|
|
||||||
catch (binding_type_exception &btex)
|
catch (binding_type_exception &btex)
|
||||||
{
|
{
|
||||||
mame_printf_error("Error performing a late bind of type %s to %s\n", btex.m_actual_type.name(), btex.m_target_type.name());
|
mame_printf_error("Error performing a late bind of type %s to %s\n", btex.m_actual_type.name(), btex.m_target_type.name());
|
||||||
@ -457,6 +452,11 @@ int running_machine::run(bool firstrun)
|
|||||||
mame_printf_error("Caught unhandled %s exception: %s\n", typeid(ex).name(), ex.what());
|
mame_printf_error("Caught unhandled %s exception: %s\n", typeid(ex).name(), ex.what());
|
||||||
error = MAMERR_FATALERROR;
|
error = MAMERR_FATALERROR;
|
||||||
}
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
mame_printf_error("Caught unhandled exception\n");
|
||||||
|
error = MAMERR_FATALERROR;
|
||||||
|
}
|
||||||
|
|
||||||
// make sure our phase is set properly before cleaning up,
|
// make sure our phase is set properly before cleaning up,
|
||||||
// in case we got here via exception
|
// in case we got here via exception
|
||||||
|
Loading…
Reference in New Issue
Block a user