Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Adds a few exceptions, refs #1268
  • Loading branch information
JJ committed Jun 24, 2019
1 parent e747d0f commit a0c8ad1
Show file tree
Hide file tree
Showing 6 changed files with 144 additions and 0 deletions.
25 changes: 25 additions & 0 deletions doc/Type/CX/Done.pod6
@@ -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
24 changes: 24 additions & 0 deletions doc/Type/CX/Emit.pod6
@@ -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
25 changes: 25 additions & 0 deletions doc/Type/CX/Proceed.pod6
@@ -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
24 changes: 24 additions & 0 deletions doc/Type/CX/Return.pod6
@@ -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
25 changes: 25 additions & 0 deletions doc/Type/CX/Succeed.pod6
@@ -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
21 changes: 21 additions & 0 deletions doc/Type/CX/Warn.pod6
@@ -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

0 comments on commit a0c8ad1

Please sign in to comment.