`raise` message format

29 views
Skip to first unread message

eksperimental

unread,
Sep 7, 2015, 12:57:22 PM9/7/15
to elixir-l...@googlegroups.com
quick question,
While the standard for raise messages is lowercase and no trailing
punctuation, there is no standard that I know of when contain more than
once sentence.

many Mix.raise messages seem to break this rule.


There is on example that made me think if this is the one we should
choose


> Mix.raise "mix test is running on environment #{Mix.env}. If you are" <>
> "running tests along another task, please set MIX_ENV explicitly"

That means, period if an upper case if a new sentence starts. still no
trailing punctuation.

What standard should we follow.
Attached the the result of the messages breaking the rule.
mix_raise.txt

José Valim

unread,
Sep 7, 2015, 1:03:06 PM9/7/15
to elixir-l...@googlegroups.com
So Mix.raise is different because the message was designed to be printed to terminal. So it shows like:

The task foo could not be found

While all others are shown like:

** (SomethingBadError) oops, something went wrong




José Valim
Skype: jv.ptec
Founder and Director of R&D


--
You received this message because you are subscribed to the Google Groups "elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/20150907235713.6d29fe0b.eksperimental%40autistici.org.
For more options, visit https://groups.google.com/d/optout.

eksperimental

unread,
Sep 7, 2015, 1:08:47 PM9/7/15
to elixir-l...@googlegroups.com
Great.
so, we still should not end with a period, right?

and ...
(just to confirm)
in the case of a Kernel.raise having more than one setence we should do:

raise "oops. Something went wrong"

correct?



On Mon, 7 Sep 2015 19:02:45 +0200
José Valim <jose....@plataformatec.com.br> wrote:

> So Mix.raise is different because the message was designed to be
> printed to terminal. So it shows like:
>
> The task foo could not be found
>
>
> While all others are shown like:
>
> ** (SomethingBadError) oops, something went wrong
>
>
>
>
>
> *José Valim*

José Valim

unread,
Sep 7, 2015, 1:19:46 PM9/7/15
to elixir-l...@googlegroups.com
Regular raise definitely should not finish with ".". I am not sure what is the standard for Mix.raise but we could just make it consistent checking which the format that is the most common so far. Probably not finishing with "." is what makes the most sense.



José Valim
Skype: jv.ptec
Founder and Director of R&D

eksperimental

unread,
Sep 7, 2015, 2:00:41 PM9/7/15
to elixir-l...@googlegroups.com
yes, that was the case, no period.
Only two message contain that "."
thank you Jose,
PR is on its way

On Mon, 7 Sep 2015 19:02:45 +0200
José Valim <jose....@plataformatec.com.br> wrote:

> So Mix.raise is different because the message was designed to be
> printed to terminal. So it shows like:
>
> The task foo could not be found
>
>
> While all others are shown like:
>
> ** (SomethingBadError) oops, something went wrong
>
>
>
>
>
> *José Valim*
Reply all
Reply to author
Forward
0 new messages