Add a try-catch block.