---
name: "Catalyst::Exception::Interface"
section: "3pm"
platform: "linux"
package: "libcatalyst-perl"
version: "5.90132-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Catalyst::Exception::Interface"
---

# Catalyst::Exception::Interface(3pm)

Role defining the interface for Catalyst exceptions

## NAME

Catalyst::Exception::Interface - Role defining the interface for Catalyst exceptions

## SYNOPSIS

```
   package My::Catalyst::Like::Exception;
   use Moose;
   use namespace::clean -except => 'meta';
   with 'Catalyst::Exception::Interface';
   # This comprises the required interface.
   sub as_string { 'the exception text for stringification' }
   sub throw { shift; die @_ }
   sub rethrow { shift; die @_ }
```

## DESCRIPTION

This is a role for the required interface for Catalyst exceptions.

It ensures that all exceptions follow the expected interface, and adds overloading for stringification when composed onto a class.

## REQUIRED METHODS

### as\_string

### throw

### rethrow

## METHODS

### meta

Provided by Moose

## SEE ALSO

- Catalyst

  - Catalyst::Exception

  ## AUTHORS

Catalyst Contributors, see Catalyst.pm

## COPYRIGHT

This library is free software. You can redistribute it and/or modify it under the same terms as Perl itself.
