try { // Code to be executed} catch (error) { // Code to execute there is an error} finally { // Optional – always execute this code}