Surround cancel with try catch block