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

try fails to catch error

 [1/7] from: gchiu:compkarori at: 27-Nov-2000 7:28


I don't know if this is WAD, but try fails to catch this error: bademail: make email! "nospam" try [ send bademail {testing} ] Fails in both the current experimental and stable versions of win32. -- Graham Chiu

 [2/7] from: mat:eurogamer at: 26-Nov-2000 19:14


Heya Graham, GC> bademail: make email! "nospam" GC> try [ send bademail {testing} ] GC> Fails in both the current experimental and stable versions GC> of win32. Does that not depend on whether your relay accepted the mail or not? -- Mat Bettinson - EuroGamer's Gaming Evangelist with a Goatee http://www.eurogamer.net | http://www.eurogamer-network.com

 [3/7] from: gchiu:compkarori at: 27-Nov-2000 9:24


Hi Mat,
> GC> bademail: make email! "nospam" > GC> try [ send bademail {testing} ]
<<quoted lines omitted: 3>>
> Does that not depend on whether your relay accepted the > mail or not?
I think my point is that the try should allow my script to continue rather than crash with * User Error: Server error: tcp 550 5.1.1 <nospam>... User unknown ** Near: insert port reduce data To get round this, I have to parse the incoming string that feeds my script to ensure that it conforms to a valid email form. Cheers, -- Graham Chiu

 [4/7] from: jeff:rebol at: 26-Nov-2000 12:59


Howdy, Graham: How about this: bademail: to-email "bogus" ERROR? try [send bademail "testing"] TRY by itself won't prevent the evaluation of the error, but ERROR? will. -jeff

 [5/7] from: gchiu:compkarori at: 27-Nov-2000 11:28


On Sun, 26 Nov 2000 12:59:26 -0800 [jeff--rebol--net] wrote:
> How about this: > > bademail: to-email "bogus" > > ERROR? try [send bademail "testing"] > > TRY by itself won't prevent the evaluation of the error, > but > ERROR? will.
Oops, that was the only part of my script that didn't have the error? word. Thanks Jeff. -- Graham Chiu

 [6/7] from: rebol:svendx:dk at: 27-Nov-2000 3:23


Hello Graham, Seems to work here (Amiga version). Here's a sample REBOL session: REBOL/Core 2.3.0.1.1 22-Jun-2000 Copyright 2000 REBOL Technologies. All rights reserved. ## bademail: make email! "nospam" == nospam ## error? try [send bademail {testing}] == true ## print mold disarm try [send bademail {testing}] make object! [ code: 800 type: 'user id: 'message arg1: {Server error: tcp 504 <nospam>: Recipient address rejected: need fully-qualified address} arg2: none arg3: none near: [insert port reduce data] where: none ] On 26-Nov-00, you wrote:
> I don't know if this is WAD, but try fails to catch this > error:
<<quoted lines omitted: 4>>
> -- > Graham Chiu
Best regards Thomas Jensen

 [7/7] from: g::santilli::tiscalinet::it at: 27-Nov-2000 16:20


Graham Chiu wrote:
> I think my point is that the try should allow my script to > continue rather than crash with > > * User Error: Server error: tcp 550 5.1.1 <nospam>... User > unknown > ** Near: insert port reduce data
Probably is just that SEND is THROWing the error; you may try adding the [CATCH] attribute to SEND or using CATCH instead of TRY (but you probably need TRY anyway...). HTH, Gabriele. -- Gabriele Santilli <[giesse--writeme--com]> - Amigan - REBOL programmer Amiga Group Italia sez. L'Aquila -- http://www.amyresource.it/AGI/

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted