txt: ## control.md
  role X::Control
  
  Role for control exceptions
  
  ```raku
  role X::Control is Exception { }
  ```
  
  This role turns an exception into a [control exception](/language/exceptions#Control_exceptions), such as [`CX::Next`](/type/CX/Next) or [`CX::Take`](/type/CX/Take). It has got no code other than the definition.
  
  Since Rakudo 2019.03, `throw`ing an object that mixes in this role `X::Control` can raise a control exception which is caught by the [CONTROL phaser](/language/phasers#CONTROL) instead of [CATCH](/language/phasers#CATCH). This allows to define custom control exceptions.
  
  For example, the custom `CX::Vaya` control exception we define below:
  
  ```raku
  class CX::Vaya does X::Control {
      has $.message
  }
  
  sub ea {
      CONTROL {
          default {
              say "Controlled { .^name }: { .message }"
          }
      }
      CX::Vaya.new( message => "I messed up!" ).throw;
  
  }
  ea;
  # OUTPUT: «Controlled CX::Vaya: I messed up!␤»
  
  ```
  