When an error occurs in your program, an error message will appear that gives the name of the file, the line number, and the column number of the code that provoked the error.
You may use the function error
in your programs to signal errors. Your error message will appear on the screen and execution will be stopped.
The function try
can be used to catch an error before execution is stopped and to continue or to try something else.