REBOL 3 Docs Guide Concepts Functions Datatypes Errors
  TOC < Back Next >   Updated: 3-Aug-2010 Edit History  

REBOL 3 Functions: why?

why?  err

Explain the last error in more detail.


err [word! path! error! none! unset!] - Optional error value


This function opens your web browser to the page in this R3 document database that explains the error message in more detail.

After an error, you can type why? (with no arguments) to see info about that specific error.

For example:

>> test
** Script error: test has no value

** Note: use WHY? for more about this error

>> why?
Opening web browser...

and, this page, no-value, would be displayed.

You can also use why? with an argument, such as an error object.

This line opens the same web page as above:

if err: try [test] [why? err]


So, how does the why? function know the last error? Use source on it to see the answer.

  TOC < Back Next > - WIP Wiki Feedback Admin