Add try and catch