Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing try/catch in sheldon_suggestions_server: suggestions/2 #49

Closed
ferigis opened this issue Oct 12, 2018 · 1 comment · Fixed by #50
Closed

Removing try/catch in sheldon_suggestions_server: suggestions/2 #49

ferigis opened this issue Oct 12, 2018 · 1 comment · Fixed by #50
Assignees

Comments

@ferigis
Copy link
Member

ferigis commented Oct 12, 2018

in this code

suggestions(MisspelledWords, Lang) ->
  try rpc:pmap({?MODULE, add_suggestions}, [Lang], MisspelledWords) of
    Result -> Result
  catch
    exit:badrpc:Stacktrace ->
      error_logger:error_msg( "~p:~p >> Error: badrpc~n\tStack: ~p"
                            , [?MODULE, ?LINE, Stacktrace]
                            ),
      MisspelledWords
  end.

we can remove the catch since the rpc:pmap/3 doesn't throw an exception

@ferigis ferigis self-assigned this Oct 12, 2018
@ferigis
Copy link
Member Author

ferigis commented Oct 12, 2018

After that change we can test with Erlang 19 and 20 since that was the only use of Erlang 21 syntax

ferigis added a commit that referenced this issue Oct 12, 2018
ferigis added a commit that referenced this issue Oct 12, 2018
ferigis added a commit that referenced this issue Oct 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant