summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/emucore.c
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2012-08-13 06:13:50 +0000
committer Aaron Giles <aaron@aarongiles.com>2012-08-13 06:13:50 +0000
commit524f627a2319bd13f661ee65756f5ef280fd5dd4 (patch)
tree303c441e408d9f42da6dccb2bd2f8c823f9d4a0d /src/emu/emucore.c
parent3258eb60147808e5067e26f3bebcabe7b2bc658a (diff)
Great idea! But let's stay classy.
Also: * Use MAME_DEBUG to flag it * Report errors by throwing an emu_fatalerror, so that we get the standard useful behaviors (break in debugger, caught during validation, stack crawls, etc)
Diffstat (limited to 'src/emu/emucore.c')
-rw-r--r--src/emu/emucore.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/emu/emucore.c b/src/emu/emucore.c
index d4c970223fe..a3cf0d660cc 100644
--- a/src/emu/emucore.c
+++ b/src/emu/emucore.c
@@ -12,16 +12,14 @@
#include "emu.h"
-void bitch_bad_cast(const std::type_info &src_type, const std::type_info &dst_type)
+void report_bad_cast(const std::type_info &src_type, const std::type_info &dst_type)
{
- fprintf(stderr, "Error: bad downcast<> or device<>. Tried to convert a %s to a %s, which are incompatible.\n",
+ throw emu_fatalerror("Error: bad downcast<> or device<>. Tried to convert a %s to a %s, which are incompatible.\n",
src_type.name(), dst_type.name());
- abort();
}
-void bitch_bad_device_cast(const device_t *dev, const std::type_info &dst_type)
+void report_bad_device_cast(const device_t *dev, const std::type_info &dst_type)
{
- fprintf(stderr, "Error: bad downcast<> or device<>. Tried to convert the device %s of type %s to a %s, which are incompatible.\n",
+ throw emu_fatalerror("Error: bad downcast<> or device<>. Tried to convert the device %s of type %s to a %s, which are incompatible.\n",
dev->tag(), dev->name(), dst_type.name());
- abort();
}