Tim, there's nothing stopping you from rethrowing errors
you don't know how to handle, eg, similar to this:
if error? set/any 'err try [print][
err: disarm err
if err/id <> 'no-arg [throw err]
]
;== none
I have *never* seen fit to rethrow errors yet, though. :)
Maybe when I start working on scheme handlers again
some day..
Regards,
Anton.
> Another approach could be best illustrated by some pythonesque
> pseudo-code:
> as in
> try:
> t: print "this will generate an error with an id of: 'need-value"
> except NeedValueError: ## python traps only the error you want to
> ## trapped
> return default-value
> (I love rebol, but python has some valuable error-trapping classes)
> ;; so we could do this with rebol:
> main: func[][
> t: print "hello"
> ]
> dump-error: func[obj[object!]][
> if obj/id = 'need-value[
> print "handling a no value error"
> return ""
> ]
> ]
> ;;
> ==================================================================
> =======================
> application: [; execution block
> print <pre>
> main
> ]
> ;;================================================================
> ======================================
> except: [dump-error disarm err ]
> if error? set/any 'err try application except
>
> --
> Tim Johnson <[EMAIL PROTECTED]>
--
To unsubscribe from the list, just send an email to
lists at rebol.com with unsubscribe as the subject.