Raven Manual - Error Handling

All error conditions can be caught in raven using try ( -- ) / catch ( -- error ) without anything being written to standard output. However all error conditions will log a message to standard error for tracking purposes.

try
    '/home/me/myfile.txt' read as $data
catch
    dup as $error
    my_custom_error_function

Custom error conditions can be triggered using throw ( error -- ) and supplying custom positive integer error codes.

1 as ERROR_CONFIG_FILE
try
    '/home/me/config.file' exists not
    if ERROR_CONFIG_FILE throw
catch
    dup as $error
    my_custom_error_function

eof