I know that in JAVA, the exception is passed through class objects.
In C ++, it is possible to transfer not only class objects, which, it seems to me, is not always competent from a programming point of view.
Can you please provide some more or less real, competent example of passing an exception in C ++?