Rebol Programming/catch

From Wikibooks, open books for an open world
< Rebol Programming
Jump to navigation Jump to search

USAGE:[edit | edit source]

CATCH block /name word 

DESCRIPTION:[edit | edit source]

Catches a throw from a block and returns its value.

CATCH is a native value.

ARGUMENTS[edit | edit source]

  • block -- Block to evaluate (Type: block)

REFINEMENTS[edit | edit source]

  • /name -- Catches a named throw.
    • word -- One or more names (Type: word block)

SOURCE CODE[edit | edit source]

catch: native[
    {Catches a throw from a block and returns its value.} 
    block [block!] "Block to evaluate" 
    /name "Catches a named throw." 
    word [word! block!] "One or more names"
]