Fix GH-15923: GDB: Python Exception <class 'TypeError'>: exceptions must derive from BaseException

Triggers on release builds when printing data structures.
You can't raise a string, you must raise exceptions.

Closes GH-15928.
This commit is contained in:
Niels Dossche 2024-09-16 22:23:45 +02:00
parent 43dc2eb6d8
commit 31e2ec63d8
No known key found for this signature in database
GPG key ID: B8A8AD166DF0E2E5
3 changed files with 6 additions and 2 deletions

View file

@ -301,7 +301,7 @@ def load_type_bits():
(symbol,_) = gdb.lookup_symbol("zend_gc_refcount")
if symbol == None:
raise "Could not find zend_types.h: symbol zend_gc_refcount not found"
raise Exception("Could not find zend_types.h: symbol zend_gc_refcount not found")
filename = symbol.symtab.fullname()
bits = {}