try { // Block of code to try throw exception; // Throw an exception when a problem arise } catch () { // Block of code to handle errors }