Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: try doesn't handle the error??

From: tim-johnsons:web at: 11-Oct-2010 13:08

Hello Thorsten: I recommend you follow along with your rebol console: Open your console and do this:
>> help disarm
USAGE: DISARM error DESCRIPTION: Returns the error value as an object. DISARM is a native value. ARGUMENTS: error -- (Type: error) * Thorsten Moeller <tmoeller-fastmail.fm> [101011 01:36]:
> Hi, > > i got a small peace of code to be handled via try functionality: > > url: http://localhost:9998 > > if error? err: try [ > result: read/custom url [ GET ] > ][ > disarm err > print err/id > ]
Here's what I did:
>> if error? err: try [ result: read/custom url [ GET ]][ err: disarm err ]
;; note that I reset 'err as a return value --------------^ connecting to: localhost
>> type? err
== object!
>> probe err
make object! [ code: 507 type: 'access id: 'no-connect arg1: "localhost" arg2: none arg3: none near: [result: read/custom url [GET]] where: 'open-proto ] I hope this helps and that you get my reply before the list does :) regards -- Tim tim at johnsons-web.com or akwebsoft.com http://www.akwebsoft.com