add catch for exception.