REBOL 3 Docs Guide Concepts Functions Datatypes Errors
  TOC < Back Next >   Updated: 20-Oct-2009 Edit History  

REBOL 3 Concepts: Errors


Errors are exceptions that occur when certain irregular conditions occur. These conditions range from syntax errors to file or network access errors. Here are a few examples:

** Syntax error: invalid "date" -- "12-30"
** Near: (line 1) 12-30
1 / 0
** Math error: attempt to divide by zero
** Where: /
** Near: / 0
read %nofile.r
** Access error: cannot open: %nofile.r reason: -3
** Where: read
** Near: read %nofile.r

Errors are processed within the system as values of the error! datatype. An error is an object that, if evaluated, will print an error message and halt. You can also catch errors and handle them in your script. Errors can be passed to functions, returned from functions, and assigned to variables.

  TOC < Back Next > - WIP Wiki Feedback Admin