[REBOL] Catching Script Error
From: chris::starforge::co::uk at: 16-Jul-2001 21:07
Hi,
I've managed to run into another problem :)
>> testing: {foo ["bar" "quux" "ping"]}
>> do testing
** Script Error: foo has no value
Well, I expected that, but I want to be able to recover from that sort of
problem. Ok, try try..
>> try [do testing]
** Script Error: foo has no value
Hmm.. not good.
>> if error? result: try [do testing] [
[ disarm result
[ print "Oops"
]
Oops
Getting there....
>> if error? result: try [do testing] [
[ disarm result
[ print result/id
]
** Script Error: foo has no value
Rats!
In other words - is there some way I can recover gracefully from an error in
a script and give some useful feedback on where the problem was without
REBOL going into a sulk? I can get by with the "There was an error in the
command body", but I'd prefer to be able to give a more useful message :/
Chris
--
New sig in the works
Explorer2260, Designer and Coder
http://www.starforge.co.uk
--
You can't carve your way to success without cutting remarks.