Method: Atlantis::Portal::Helpers#try

Defined in:
lib/Atlantis/portal/helpers.rb

#tryObject



65
66
67
68
69
70
71
72
73
74
75
# File 'lib/Atlantis/portal/helpers.rb', line 65

def try
  return unless block_given?

  begin
    yield
  rescue UnsuccessfulAuthenticationError
    say_error "Could not authenticate with the service. Check that your username & password are correct, and that your membership is valid and all pending Terms of Service & agreements are accepted. If this problem continues, try logging into the service from a browser to see what's going on." and abort
  rescue UnknownTeamError
    say_error "Could not find the specified team. Check if your team parameter is correct."
  end
end