angerangel edited this page Jan 7, 2013 · 1 revision

USAGE

   WHY? 'err

DESCRIPTION

Explain the last error in more detail.

WHY? is a function value.

ARGUMENTS

  • err -- Optional error value (word! path! error! none! unset!)

#SOURCE

why?: make function! [  [
    "Explain the last error in more detail."
    'err [word! path! error! none! unset!] "Optional error value"
][
    case [
        unset? :err [err: none]
        word? err [err: get err]
        path? err [err: get err]
    ]
    either all [
        error? err: any [:err system/state/last-error]
        err/type
    ] [
        say-browser
        err: lowercase ajoin [err/type #"-" err/id]
        browse join http://www.rebol.com/r3/docs/errors/ [err ".html"]
    ] [
        print "No information is available."
    ]
    exit
] ]
Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.