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

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