Answers for "c++ if statement exception handling"

C++
1

error handling in C++

try  {
       throw 10; //Error Detected and "Thrown" to catch block
    }
catch (char *excp)  { //if error is thrown matches this block, exec
        cout << "Caught " << excp;
    }
catch (...)  { //default case
        cout << "Default Exception\n";
    }
Posted by: Guest on January-11-2022

Browse Popular Code Answers by Language