[erlang-questions] Parse transforms: signalling errors and warnings.

Peti Gömöri <>
Sat Oct 29 13:14:47 CEST 2016


Hi Alex

I think the undef is because you have to export a format(Reason) function
as well in Module which returns a pretty printed reason.

Peter

On Sat, Oct 29, 2016 at 11:46 AM, Alex Arnon <> wrote:

> Hi All!
>
> I am trying to build a simple parse transform, that makes a small
> modification when a called function's name is of a certain form. I would
> like to signal that an error has occurred (e.g. the name is malformed, or
> arguments of wrong kind). How can I do this?
> I have tried to insert {error, X}, with various types of X (including the
> {Line, Module, Reason} form, which pacifies erl_lint at least), but
> compilation with erlc keeps failing with:
>
>     Compiler function compile:compile/3 returned:
>     {error,undef}
>
> Thanks in advance,
> Alex.
>
>
> _______________________________________________
> erlang-questions mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-questions
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20161029/d7f1f698/attachment.html>


More information about the erlang-questions mailing list