You could run it under gdb.
Start gdb with:
Type run to run it, and when the exception occurs and execution stops, type bt for a backtrace (it will print the stack, line numbers, functions, etc.)
As long as your program is using throw or abort() to exit, the system will dump your program's core if the limit on the size of the core dump is reasonable.
to see the current upper limit in core dump size and
ulimit -c 100000000
to set it to unlimited.
When your program exits, you'll see something like
Aborted (core dumped)
A file will be created in the current directory with a name like "core". Run gdb on your program with the -c COREFILENAME option, and you can work on what is essentially a snapshot of your program running just before it aborted. Typing bt will give you a stack trace just as before.