summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu
diff options
context:
space:
mode:
authorGravatarGravatar MooglyGuy <therealmogminer@gmail.com>2019-11-18 15:26:06 +0100
committerGravatarGravatar MooglyGuy <therealmogminer@gmail.com>2019-11-18 17:31:08 +0100
commit0a0d0fd9b03b791767b1400f713d63aa1647fcba (patch)
tree22ffa1547208206d5209c422e90447b6396ef8a9 /src/emu
parenta0d110e5f6cd50f8915b1112c96d2084a717513f (diff)
-save: Print the name of non-fundamental save_items when fatalerroring, for easier debugging. nw
Diffstat (limited to 'src/emu')
-rw-r--r--src/emu/save.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/emu/save.h b/src/emu/save.h
index 2b4798b9d4c..a5ae5437414 100644
--- a/src/emu/save.h
+++ b/src/emu/save.h
@@ -150,7 +150,7 @@ public:
if (type_checker<ItemType>::is_pointer)
throw emu_fatalerror("Called save_item on a pointer with no count!");
if (!type_checker<typename array_unwrap<ItemType>::underlying_type>::is_atom)
- throw emu_fatalerror("Called save_item on a non-fundamental type!");
+ throw emu_fatalerror("Called save_item on a non-fundamental type, name %s!", valname);
save_memory(device, module, tag, index, valname, array_unwrap<ItemType>::ptr(value), array_unwrap<ItemType>::SIZE, array_unwrap<ItemType>::SAVE_COUNT);
}
@@ -159,7 +159,7 @@ public:
void save_pointer(device_t *device, const char *module, const char *tag, int index, ItemType *value, const char *valname, u32 count)
{
if (!type_checker<typename array_unwrap<ItemType>::underlying_type>::is_atom)
- throw emu_fatalerror("Called save_item on a non-fundamental type!");
+ throw emu_fatalerror("Called save_item on a non-fundamental type, name %s!", valname);
save_memory(device, module, tag, index, valname, array_unwrap<ItemType>::ptr(value[0]), array_unwrap<ItemType>::SIZE, array_unwrap<ItemType>::SAVE_COUNT * count);
}
@@ -168,7 +168,7 @@ public:
void save_pointer(device_t *device, const char *module, const char *tag, int index, std::unique_ptr<ItemType[]> &value, const char *valname, u32 count)
{
if (!type_checker<typename array_unwrap<ItemType>::underlying_type>::is_atom)
- throw emu_fatalerror("Called save_item on a non-fundamental type!");
+ throw emu_fatalerror("Called save_item on a non-fundamental type, name %s!", valname);
save_memory(device, module, tag, index, valname, array_unwrap<ItemType>::ptr(value[0]), array_unwrap<ItemType>::SIZE, array_unwrap<ItemType>::SAVE_COUNT * count);
}