The read-only system variable
ERL contains a value indicating where the last error was encountered. When the system is started,
ERL contains the value
0, and if an error occurs in the interactive mode, it gets set to
0 again. If an error occurs in a program,
ERL contains the line number that triggered the error.
This system variable is often used in conjunction with