Answers for "exception handling in c++ example"

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

Code answers related to "exception handling in c++ example"

Browse Popular Code Answers by Language