callback in try catch