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

[REBOL] Re: How safe is catch []

From: SQLAB:gmx at: 25-Apr-2005 14:20

Hi Volker Try seems to be safe in that case, as I use it in the same application many times. Throw some-data has probably the same effect, as my second example was just a shortening. If I remember right, it was more like throw something to a function call a few levels higher AR Volker Nitsch wrote:
>On 4/25/05, SQLAB <[SQLAB--gmx--net]> wrote: > >> >>Hi Volker >> >>Volker Nitsch wrote: >> >> >> >>>Just curious: can you throw something? not >>> if .. [thow] >>> >>> > >throw can take an argument. it can also take no arguments (its >any-type). but i thought maybe that has an error. >if it is 'catch, try 'try instead and throw an error. >if error? try[ > .. > if not important[throw make error! "forget it"] > .. >] > >'try is more often used, maybe better debugged. thats also the way >Ladislavs 'throw' works, as far as i see. > >Oh, and of course there is > forever .. [ > .. > if not important[break] > .. > ] >if you are not in an inner loop. >
I am always in an inner loop and I just want to use throw as Carl recommended instead of the classic C continue.