How to catch any clangs' exceptions

Hello,
I’m using clang lib in my application to analyse c/c++ files.
I’m doing that by using clang::tooling::buildASTFromCodeWithArgs() method.
When I’m trying to parse some files, for example file with #defines and #ifs only I get exception with given callstack

How could I handle these exceptions so my application won’t crash? try catch doesnt work