Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[control.pir] take without gather now warns
Before this commit, a 'take' without a (dynamically) enclosing 'gather'
block halted the program without explanation. This commit makes the
condition non-fatal and adds a warning message. Tene++ for guidance.
  • Loading branch information
Carl Masak committed Jul 1, 2009
1 parent 2dded8e commit 468c021
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion perl6.pir
Expand Up @@ -214,7 +214,7 @@ and report exceptions.
.get_results (exception)
$I0 = exception['severity']
if $I0 == .EXCEPT_EXIT goto exit
if $I0 != .EXCEPT_WARNING goto not_warning
if $I0 > .EXCEPT_WARNING goto not_warning
printerr exception
printerr "\n"
$P0 = exception["resume"]
Expand Down
1 change: 1 addition & 0 deletions src/builtins/control.pir
Expand Up @@ -85,6 +85,7 @@ the moment -- we'll do more complex handling a bit later.)
$P0 = root_new ['parrot';'Exception']
$P0['type'] = .CONTROL_TAKE
$P0['severity'] = .EXCEPT_NORMAL
$P0['message'] = 'take without gather'
setattribute $P0, 'payload', value
throw $P0
.return (value)
Expand Down

0 comments on commit 468c021

Please sign in to comment.