Handling synchronous exceptions is known as exception handling. Exception handling deals with detecting run-time exceptions and reporting it to the user for taking appropriate action. C++ provides try, catch, and throw elements for handling exceptions. A try block contains code which might raise exceptions. Syntax of try block is as follows: 1 2 3 4 5 try { //Code ... } A catch block contains code for handling exceptions that may raise in the try block. Syntax of catch block is as follows: 1 2 3 4 5 catch(Exception–type) { //Code to handle exception ... } The
The post Here are the basics of Exception Handling appeared first on Coding Security.
Here are the basics of Exception Handling
read more
Tidak ada komentar:
Posting Komentar