Programming |  C++ Programming |  exception handling

    try {
        <something>
    }
    catch(problem_type &parameter) {
        <do something this specific kind of exception>

    }
    catch(...) {
        <do something to catch any other exceptions>
    }

In the code, generate an exception:

    throw <problem_type>