Is there any advantages or uses cases to throw other thing that a std::exception( or a derivatives types).
For example throw 1;
or throw \"error\";
Per §15.1 [except]:
Exception handling provides a way of transferring control and information from a point in the execution of a thread to an exception handler associated with a point previously passed by the execution.
The word information illustrates everything, it can be everything such as objects, numbers, ... .
There is nothing in standard that says you must just throw std::exception
. In the other words, maybe someone wants to throw his own exception objects.
Maybe someone wants to use exception-handling to handle something far from normal exceptions.