REBOL3 tracker
  0.9.12 beta
Ticket #0000583 User: anonymous

Project:



rss
TypeBug Statusdismissed Date28-Jan-2009 18:56
Versionalpha 32 Categoryn/a Submitted bySunanda
PlatformAll Severitynot a bug Prioritylow

Summary attempt returns error with bad code
Description The help suggests 'attempt cannot return an error.
But it can -- see example.
Perhaps the help could be adjusted:

help attempt
USAGE:
ATTEMPT block

DESCRIPTION:
Tries to evaluate a block and returns result or NONE on error.
ATTEMPT is a native value.

***
Same issue is true in R2
Example code
attempt [break]
** Throw error: No loop to break

Assigned ton/a Fixed in- Last Update24-Jun-2009 01:56


Comments
(0001039)
BrianH
24-Jun-2009 01:55

The BREAK breaks out of the ATTEMPT code block, *then* triggers an error when it doesn't find a loop. The error isn't generated by the BREAK function itself - it is generated by the top-level break catcher that gets overriden by the loop break catchers.

It's obscure and arcane, but not a bug :)

Date User Field Action Change
24-Jun-2009 01:56 BrianH Severity Modified text => not a bug
24-Jun-2009 01:56 BrianH Status Modified reviewed => dismissed
24-Jun-2009 01:55 BrianH Comment : 0001039 Modified -
24-Jun-2009 01:55 BrianH Comment : 0001039 Added -
29-Jan-2009 21:18 BrianH Description Modified -
29-Jan-2009 21:18 BrianH Code Modified -
29-Jan-2009 21:18 BrianH Severity Modified minor => text
29-Jan-2009 21:18 BrianH Status Modified submitted => reviewed
29-Jan-2009 21:18 BrianH Priority Modified normal => low
28-Jan-2009 18:56 sunanda Ticket Added -