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

Fix error reason message #222

Merged
merged 1 commit into from
May 26, 2020
Merged

Conversation

fhunleth
Copy link
Contributor

This fixes an exception you'd get if the error reason is something more
complicated than an atom or string. For example:

** (Protocol.UndefinedError) protocol String.Chars not implemented for {:options, {:sslv3, {:versions, [:"tlsv1.2", :"tlsv1.1", :tlsv1, :sslv3]}}} of type Tuple. This protocol is implemented for the following type(s): Time, NaiveDateTime, List, Version, Atom, URI, DateTime, Integer, Date, BitString, Float, Version.Requirement
    (elixir 1.10.3) lib/string/chars.ex:3: String.Chars.impl_for!/1
    (elixir 1.10.3) lib/string/chars.ex:22: String.Chars.to_string/1
    lib/excoveralls/poster.ex:58: ExCoveralls.Poster.send_file/2
    lib/excoveralls/poster.ex:13: ExCoveralls.Poster.execute/2
    (mix 1.10.3) lib/mix/tasks/test.ex:484: Mix.Tasks.Test.do_run/3
    (mix 1.10.3) lib/mix/task.ex:330: Mix.Task.run_task/3
    lib/mix/tasks.ex:54: Mix.Tasks.Coveralls.do_run/2
    (mix 1.10.3) lib/mix/task.ex:330: Mix.Task.run_task/3
    (mix 1.10.3) lib/mix/cli.ex:82: Mix.CLI.run_task/2
    (elixir 1.10.3) lib/code.ex:926: Code.require_file/2

This fixes an exception you'd get if the error reason is something more
complicated than an atom or string. For example:

```
** (Protocol.UndefinedError) protocol String.Chars not implemented for {:options, {:sslv3, {:versions, [:"tlsv1.2", :"tlsv1.1", :tlsv1, :sslv3]}}} of type Tuple. This protocol is implemented for the following type(s): Time, NaiveDateTime, List, Version, Atom, URI, DateTime, Integer, Date, BitString, Float, Version.Requirement
    (elixir 1.10.3) lib/string/chars.ex:3: String.Chars.impl_for!/1
    (elixir 1.10.3) lib/string/chars.ex:22: String.Chars.to_string/1
    lib/excoveralls/poster.ex:58: ExCoveralls.Poster.send_file/2
    lib/excoveralls/poster.ex:13: ExCoveralls.Poster.execute/2
    (mix 1.10.3) lib/mix/tasks/test.ex:484: Mix.Tasks.Test.do_run/3
    (mix 1.10.3) lib/mix/task.ex:330: Mix.Task.run_task/3
    lib/mix/tasks.ex:54: Mix.Tasks.Coveralls.do_run/2
    (mix 1.10.3) lib/mix/task.ex:330: Mix.Task.run_task/3
    (mix 1.10.3) lib/mix/cli.ex:82: Mix.CLI.run_task/2
    (elixir 1.10.3) lib/code.ex:926: Code.require_file/2
```
@coveralls
Copy link

Coverage Status

Coverage remained the same at 89.823% when pulling 7a1f587 on fhunleth:fix-error-message into 6332f40 on parroty:master.

@parroty parroty merged commit cf98bab into parroty:master May 26, 2020
@parroty
Copy link
Owner

parroty commented May 26, 2020

Thanks!

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 this pull request may close these issues.

3 participants