Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

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
";
    }
 
PREVIOUS NEXT
Tagged: #error #handling
ADD COMMENT
Topic
Name
7+8 =