Exception Handling

try-catch

English

Overview

Syntax that wraps code that might throw an exception and separates out what happens if it does.

Details

Syntax where code that might throw is wrapped in a try block, and handling for that case is written separately in a catch block. You can also provide multiple catch blocks to handle different exception types differently.

More Programming terms