[erlang-questions] Understanding error messages

T Ty <>
Sun Jan 6 09:48:55 CET 2019


In this particular instance the last line is a red herring. It was a rough
guide after-all :)

Basically *{init, do_boot,3 ....}* is indicating it failed while trying to
initialize the system. The next line up shows the problem is in line 24 of
*readscoretest:main/1* and that *diolib:openINPUTfile* is undefined.

Usually I would ignore the non-recognizable stuff and focus on the modules
and functions in my code to home in on the problem area.

On Sat, Jan 5, 2019 at 11:39 PM Donald Steven <> wrote:

> Thanks!
>
> Just to try a very simple run, I changed one letter (on line 24) in an
> otherwise ok block of code so that a function call to an external module
> would fail.  Here's the error message:  {"init terminating in
> do_boot",{undef,[{diolib,openINPUTfile,['score.dat'],[]},{readscoretest,main,1,[{file,"readscoretest.erl"},{line,24}]},{init,start_em,1,[]},{init,do_boot,3,[]}]}}
>
> If I wrote a simple error message along these lines, it might say: *Line
> 24, function diolib:openINPUTfile is undefined.*
>
> But what is all the other stuff (for example,
> *{init,start_em,1,[]},{init,do_boot,3,[]}]}}*) trying to say?
>
> Don
>
> On 1/5/2019 6.27 PM, T Ty wrote:
>
> Just look at the first line and the last line. One gives you the exact
> file and line that is causing the error, the other the reason for the error
> aka function clause, pattern match etc.
>
> If non of the file names on these two lines look recognizable its likely
> you triggered something in your gen_server.
>
> A very rough guide. :)
>
> On Fri, Jan 4, 2019 at 2:22 PM PAILLEAU Eric <>
> wrote:
>
>> https://learnyousomeerlang.com/errors-and-exceptions#run-time-errors
>>
>> cheers
>>
>> Le 04/01/2019 à 13:59, Donald Steven a écrit :
>> > Is there a good explanation -- suitable for beginners -- of the run
>> time
>> > error messages?  Undoubtedly they provide a wealth of useful
>> > information, but they seem so cryptic for newbies.
>> >
>> >
>> > Thanks.
>> >
>> >
>> > Don
>> >
>> > _______________________________________________
>> > erlang-questions mailing list
>> > 
>> > http://erlang.org/mailman/listinfo/erlang-questions
>>
>> _______________________________________________
>> erlang-questions mailing list
>> 
>> http://erlang.org/mailman/listinfo/erlang-questions
>>
>
> _______________________________________________
> erlang-questions mailing ://erlang.org/mailman/listinfo/erlang-questions
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20190106/ce7990d5/attachment.html>


More information about the erlang-questions mailing list