Debug_event.info() and debug_event.modinfo() both crash IDA with error 1502

debug_event = ida_dbg.get_debug_event()
a = debug_event.info()  # IDA bug: Internal error 1502 occurred when running a script.

# Another run:
b = debug_event.modinfo() # IDA bug: Internal error 1502 occurred when running a script.

It probably happens when you use an accessor not matching the event code. For example, info() is valid only for THREAD_STARTED, LIB_UNLOADED, or INFORMATION, and modinfo() for PROCESS_STARTED, PROCESS_ATTACHED, or LIB_LOADED.

Alright, I would prefer to not get an interr even if I try to access a special member.