class X::Phaser::PrePost is Exception { }

Thrown when the condition inside a PRE or POST phaser evaluate to a false value.

For example

sub f($x{ PRE { $x ~~ Int } };
f "foo";
CATCH { default { put .^name''.Str } };
# OUTPUT: X::Phaser::PrePost: Precondition '{ $x ~~ Int }' failed«␤»


method phaser§

method phaser(--> Str:D)

Returns the name of the failed phaser, "PRE" or "POST".

method condition§

method condition(--> Str:D)

Returns the part of the source code that describes the phaser condition.


Type relations for X::Phaser::PrePost
raku-type-graph X::Phaser::PrePost X::Phaser::PrePost Exception Exception X::Phaser::PrePost->Exception Mu Mu Any Any Any->Mu Exception->Any

Expand chart above