<<< | Index | >>> |
An object of any copy-able type can be an exception:
#include <iostream> void main() { try { throw 20; } catch ( int ex ) { std::cout << "Exception occurred: " << ex; } }
Avoid using native types: int, bool, and so on.
Often classes are created specifically for exceptions.
The STL provides
<<< | Index | >>> |