# perldoc > Test2::Event::Bail

---
type: CommandReference
command: Test2::Event::Bail
mode: perldoc
section: ""
source: perldoc
---

## Quick Reference

- `$ctx->bail('reason')` — Generate a bailout event to halt testing.
- `$e->reason` — Get the reason string from the event.

## Name

Test2::Event::Bail — Bailout!

## Synopsis

perl
use Test2::API qw/context/;
use Test2::Event::Bail;

my $ctx = context();
my $event = $ctx->bail('Stuff is broken');
## Options

- `$reason = $e->reason` — The reason for the bailout. Inherits from `Test2::Event`.

## Examples

perl
use Test2::API qw/context/;
use Test2::Event::Bail;

my $ctx = context();
my $event = $ctx->bail('Stuff is broken');
## See Also

- [Test2::Event](http://localhost/phpMan.php/perldoc/Test2%3A%3AEvent/markdown)
- Source repository: <http://github.com/Test-More/test-more/>