// very simple explination . try{ codeA... } catch(EXCEPTION $ex){ codeB.... } //the code in the block Catch excuted if there is an erro in the codeA in the block TRY