Question - What Is The Syntax To Handle An Exception?
Answer -
The following syntax is used to handle an exceptions:
try {
// code that might throw an exception
}
on Exception1 {
// code for handling exception
}
catch Exception2 {
// code for handling exception
}