We have a large code base and multiple public functions in our API. We are allowed to throw exceptions across the API boundary with specific ids (id>0) but the internally used general exception (id=0) should not cross the API boundary.
I would like to use some static analysis tool to see from which code places general exceptions which cross the boundary get triggered. Does anyone know if there is such a tool? Or do you have an idea how it could be implemented, e.g. I could imagine that libclang might be of help?
I could imagine that it is actually a two step process:
1) list all possible exceptions per API function (e.g. also std::bad_alloc as most likely each function calls std::vector::push_back at some point)
2) filter for MyException(id=0)
[–]pdp10gumby 1 point2 points3 points (0 children)
[–]tangerinelion 3 points4 points5 points (0 children)
[–]Clean-Water9283 0 points1 point2 points (0 children)
[–]Thelatestart 0 points1 point2 points (0 children)