If the code is throwing an exception and you want to catch at the point where the exception is thrown, use the below gdb commands:
gdb <program_name>
(gdb) catch throw
Catchpoint 1 (throw)
(gdb) run
Thread 17 "test_unit_" hit Catchpoint 1 (exception thrown), 0x00007ffff78da8bd in __cxa_throw () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
(gdb) where
-------------------------------------
stack trace follows
-------------------------------------