[erlang-questions] parse_transform and error messages

denis dloutrein.lists@REDACTED
Fri Oct 31 18:49:40 CET 2008


You can do it by adding the term
{error, {Line, Module, Msg::io_list()}}
into the AST.

You can generate an error in a module, and look at the generated AST
to have an example.

Hope this helps
Denis

2008/10/31 Paul Guyot <pguyot@REDACTED>:
> Hello,
>
> Is there a way to generate nice error messages (and warnings) with
> parse_transform? I currently raise a custom error to make compilation
> fail, but the error message could be nicer.
>
> For example, I wish I could raise an undefined_module error, so it
> would print a message just like erl_lint does when -module attribute
> isn't defined.
>
> Paul
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions
>



More information about the erlang-questions mailing list