---
title: "analyse/types/unused-throws-type"
pagination: false
---

{/* Generated by scripts/gen-rule-docs.py. Edit mapping.toml, not this file. */}

<RuleId id="analyse/types/unused-throws-type" />

In the [`analyse-recommended`](/docs/rules/presets/analyse-recommended) preset and every stricter one. Report only. Upstream gates: `exceptions.check.tooWideThrowType`.

## Configuration

```toml title="pun.toml"
[analyse.rules]
"types/unused-throws-type" = "on"
```

To skip it in some files or lines, add an [ignore comment](/docs/configuration/ignore-comments).

## Replaces

- [`TooWideFunctionThrowTypeRule`](https://phpstan.org/error-identifiers/throws.unusedType) (phpstan-classes)
- [`TooWideThrowType`](https://mago.carthage.software/1.61.0/en/tools/analyzer/overview/) (mago-analyzer)
- [`throws.unusedType`](https://phpstan.org/error-identifiers/throws.unusedType) (phpstan)

[More analyse/types rules](/docs/rules/analyse/types) · [Edit this page](https://github.com/shipfastlabs/pun/edit/main/crates/pun-config/rules/mapping.toml)
