Understanding error messages

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Understanding error messages

Donald Steven
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
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Understanding error messages

PAILLEAU Eric
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
> [hidden email]
> http://erlang.org/mailman/listinfo/erlang-questions

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Understanding error messages

Donald Steven
Thanks Eric!

On 1/4/2019 9.22 AM, 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
>> [hidden email]
>> http://erlang.org/mailman/listinfo/erlang-questions
>
> _______________________________________________
> erlang-questions mailing list
> [hidden email]
> http://erlang.org/mailman/listinfo/erlang-questions

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Understanding error messages

t ty
In reply to this post by PAILLEAU Eric
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 <[hidden email]> 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
> [hidden email]
> http://erlang.org/mailman/listinfo/erlang-questions

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Understanding error messages

Donald Steven
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 <[hidden email]> 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
> [hidden email]
> http://erlang.org/mailman/listinfo/erlang-questions

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions


_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Understanding error messages

t ty
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 <[hidden email]> 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 <[hidden email]> 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
> [hidden email]
> http://erlang.org/mailman/listinfo/erlang-questions

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions


_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions