Sun Studio 12: Debugging a Program With dbx

whocatches Command

The whocatches command tells where a C++ exception would be caught. It is valid only in native mode.


whocatches type

Tell where (if at all) an exception of type type would be caught if thrown at the current point of execution. Assume the next statement to be executed is a throw x where x is of type type, and display the line number, function name, and frame number of the catch clause that would catch it.

Will return "type is unhandled" if the catch point is in the same function that is doing the throw.


type is the type of an exception.