Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Adds a few exceptions, refs #1268
- Loading branch information
Showing
6 changed files
with
144 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| =begin pod | ||
| =TITLE role CX::Done | ||
| =SUBTITLE Done control exception | ||
| role CX::Done does X::Control { } | ||
| A L<control exception|/language/exceptions#Control_exceptions> to be used to | ||
| indicate a supply block is finished; since Rakudo 2019.03, C<throw>ing an | ||
| C<X::Control> object raises a control exception which is caught by the | ||
| L<CONTROL phaser|/language/phasers#CONTROL> instead of | ||
| L<CATCH|/language/phasers#CATCH>. | ||
| =head1 Methods | ||
| =head2 method message | ||
| Defined as: | ||
| method message() | ||
| Returns "<done control exception>" | ||
| =end pod |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| =begin pod | ||
| =TITLE role CX::Emit | ||
| =SUBTITLE Emit control exception | ||
| role CX::Emit does X::Control { } | ||
| A L<control exception|/language/exceptions#Control_exceptions> to be used when | ||
| emit is used inside a C<Supply> block; since Rakudo 2019.03, C<throw>ing an | ||
| C<X::Control> object raises a control exception which is caught by the L<CONTROL | ||
| phaser|/language/phasers#CONTROL> instead of L<CATCH|/language/phasers#CATCH>. | ||
| =head1 Methods | ||
| =head2 method message | ||
| Defined as: | ||
| method message() | ||
| Returns "<emit control exception>" | ||
| =end pod |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| =begin pod | ||
| =TITLE role CX::Proceed | ||
| =SUBTITLE Proceed control exception | ||
| role CX::Proceed does X::Control { } | ||
| A L<control exception|/language/exceptions#Control_exceptions> to be used when | ||
| C<proceed> is used in C<when> or C<default> blocks; since Rakudo 2019.03, | ||
| C<throw>ing an C<X::Control> object raises a control exception which is caught | ||
| by the L<CONTROL phaser|/language/phasers#CONTROL> instead of | ||
| L<CATCH|/language/phasers#CATCH>. | ||
| =head1 Methods | ||
| =head2 method message | ||
| Defined as: | ||
| method message() | ||
| Returns "<proceed control exception>" | ||
| =end pod |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| =begin pod | ||
| =TITLE role CX::Return | ||
| =SUBTITLE Return control exception | ||
| role CX::Next does X::Control { } | ||
| A L<control exception|/language/exceptions#Control_exceptions> to be used when | ||
| return is called from within a sub; since Rakudo 2019.03, C<throw>ing an | ||
| C<X::Control> object raises a control exception which is caught by the L<CONTROL | ||
| phaser|/language/phasers#CONTROL> instead of L<CATCH|/language/phasers#CATCH>. | ||
| =head1 Methods | ||
| =head2 method message | ||
| Defined as: | ||
| method message() | ||
| Returns "<return control exception>" | ||
| =end pod |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| =begin pod | ||
| =TITLE role CX::Succeed | ||
| =SUBTITLE Succeed control exception | ||
| role CX::Succeed does X::Control { } | ||
| A L<control exception|/language/exceptions#Control_exceptions> thrown when | ||
| C<succeed> is called from a C<when> or C<default> block; since Rakudo 2019.03, | ||
| C<throw>ing an C<X::Control> object raises a control exception which is caught | ||
| by the L<CONTROL phaser|/language/phasers#CONTROL> instead of | ||
| L<CATCH|/language/phasers#CATCH>. | ||
| =head1 Methods | ||
| =head2 method message | ||
| Defined as: | ||
| method message() | ||
| Returns "<next control exception>" | ||
| =end pod |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| =begin pod | ||
| =TITLE role CX::Warn | ||
| =SUBTITLE Control exception warning | ||
| role CX::Warn does X::Control { } | ||
| A L<control exception|/language/exceptions#Control_exceptions> to warn about any | ||
| incidence; since Rakudo 2019.03, C<throw>ing an C<X::Control> object raises a | ||
| control exception which is caught by the L<CONTROL | ||
| phaser|/language/phasers#CONTROL> instead of L<CATCH|/language/phasers#CATCH>. | ||
| =head1 Methods | ||
| =head2 method new | ||
| C<CX::Warn> objects are created when a warning is thrown in any sentence. | ||
| =end pod |