[REBOL] Trapping errors? - Not like the book says? Re:(2)

2000-08-03 Thread rebol
Hi Eric, >SEND doesn't return a value, so TRY doesn't return one either. As a >result all the set-word error: sees is the unset! value, which produces >the error. Exactly. >If you add 'true to the end of the try block, that >ensures you'll have some value to set 'error to. 1. A better way t

[REBOL] Trapping errors? - Not like the book says? Re:

2000-08-03 Thread rebol
Hi Douglas, 1. to correct that problem use set/any 'error try [...] 2. Why don't you join the REBOL ... Guide mailing list? I think that will be a better forum for discussing book related issues, so as not to waste the bandwidth for people who haven't bought the book. 3. BTW, the RTOG list is o

[REBOL] Trapping errors? - Not like the book says? Re:(2)

2000-08-03 Thread doug . vos
Thanks! Just prior to getting your email, I tried putting (error: none) right after send... in the block. It works also. So I hope this saves some other soul some frustration. In fact I can just put: yes, or no, or none - just so that "try" will return some value. You are correct in pointing o

[REBOL] Trapping errors? - Not like the book says?

2000-08-03 Thread doug . vos
I have read and re-read the sections REBOL the official guide. about errors. (eg. pages 276 and following) Then I put together a function to log errors called log-event (with a refinement for handling disarmed error objects). The log-event function will then log the date, time, script name, "erro