REBOL Programming/catch

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

USAGE:[edit]

CATCH block /name word 

DESCRIPTION:[edit]

Catches a throw from a block and returns its value.

CATCH is a native value.

ARGUMENTS[edit]

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

REFINEMENTS[edit]

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

SOURCE CODE[edit]

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"
]

{{BookCat}}