The try statement allows you to define a block of code to be tested for errors while it is being executed.
The catch statement allows you to define a block of code to be executed, if an error occurs in the try block.
try {
// Block of code to try
}
catch(Exception e) {
// Block of code to handle errors
}
No reviews yet.