How to catch all exception types except one using GDB?

Viewed 293

I'm aware of _catch throw_ or even _catch throw MyExceptionType_.

What I need is everything else than a certain exception type.

2 Answers

Since gdb uses a regular expression for the exception string, you could use catch throw (?!MyExceptionType) (this will match any exception except for exactly "MyExceptionType")

See also Match everything except for specified strings

Specify a condition for the breakpoint on catch throw, look at break condition

Related