# Message

> Exception message templates authored by this package.

[API reference](/docs/api/index.md) › [Yii3 Debug](/docs/extensions/yii3-debug/reference/index.md) › [Exception](/docs/extensions/yii3-debug/reference/exception/index.md) › Message

| enum | `Yii3\Debug\Exception\Message` |
| --- | --- |
| Backed by | `string` |
| Source | [`src/Exception/Message.php`](https://github.com/yii3/debug/blob/main/src/Exception/Message.php#L14) |

Exception message templates authored by this package.

Use [`Message::getMessage()`](/docs/extensions/yii3-debug/reference/exception/message/index.md#method-getMessage) to format a template with `sprintf()` arguments.

## Cases

| Case | Value | Description |
| --- | --- | --- |
| <span id="case-BUILT_IN_PANEL_MISSING"></span>`BUILT_IN_PANEL_MISSING` | `'Built-in debug panel "%s" is missing.'` | Indicates that a built-in panel ID listed by `BuiltInPanels::IDS` has no panel instance. |
| <span id="case-BUILT_IN_PANEL_UNKNOWN"></span>`BUILT_IN_PANEL_UNKNOWN` | `'Debug panel "%s" is not built in. Built-in panels: %s.'` | Indicates that a panel was supplied as built-in under an ID `BuiltInPanels::IDS` does not list. |
| <span id="case-CAPTURED_MAIL_DIRECTORY_CREATE_FAILED"></span>`CAPTURED_MAIL_DIRECTORY_CREATE_FAILED` | `'Unable to create captured mail directory: %s'` | Indicates that the directory holding the captured `.eml` files could not be created or given its mode. |
| <span id="case-CAPTURED_MAIL_EMAIL_CONVERSION_FAILED"></span>`CAPTURED_MAIL_EMAIL_CONVERSION_FAILED` | `'Unable to convert captured mail to a Symfony email: %s'` | Indicates that a captured message could not be converted to the email the Symfony adapter sends. |
| <span id="case-CAPTURED_MAIL_FILE_PERSIST_FAILED"></span>`CAPTURED_MAIL_FILE_PERSIST_FAILED` | `'Unable to persist captured mail file: %s'` | Indicates that a captured message could not be written as an `.eml` file or given its mode. |
| <span id="case-COLLECTOR_ID_MISMATCH"></span>`COLLECTOR_ID_MISMATCH` | `'Debug collector registered as "%s" must match its ID "%s".'` | Indicates that a collector registration key does not match the ID the collector declares. |
| <span id="case-DEBUG_PANEL_NOT_CAPTURED"></span>`DEBUG_PANEL_NOT_CAPTURED` | `'Debug panel was not captured.'` | Indicates that the requested capture holds no payload for the requested panel. |
| <span id="case-DEBUG_PANEL_UNAVAILABLE"></span>`DEBUG_PANEL_UNAVAILABLE` | `'The requested debug panel is not available.'` | Indicates that the requested panel cannot be served. |
| <span id="case-DEBUG_SERVICE_UNAVAILABLE"></span>`DEBUG_SERVICE_UNAVAILABLE` | `'The debug service %s is not available.'` | Indicates that the container resolved a debugger service to an unexpected type. |
| <span id="case-DEBUG_SNAPSHOT_NOT_FOUND"></span>`DEBUG_SNAPSHOT_NOT_FOUND` | `'Debug snapshot not found.'` | Indicates that the requested capture is no longer retained. |
| <span id="case-EXTENSION_COLLECTOR_ENABLED_INVALID"></span>`EXTENSION_COLLECTOR_ENABLED_INVALID` | `'Debug collector option "enabled" for "%s" must be a boolean.'` | Indicates that a collector entry declares a non-boolean "enabled" option. |
| <span id="case-EXTENSION_COLLECTOR_OPTION_UNKNOWN"></span>`EXTENSION_COLLECTOR_OPTION_UNKNOWN` | `'Unknown debug collector option "%s" for "%s". Available option: enabled.'` | Indicates that a collector entry declares an option other than "enabled". |
| <span id="case-EXTENSION_ENTRY_INVALID"></span>`EXTENSION_ENTRY_INVALID` | `'Debug registration "%s" must be a class string or an array declaring a "class" string.'` | Indicates that a registration entry is neither a class string nor an array declaring a class string. |
| <span id="case-EXTENSION_PANEL_ID_DUPLICATE"></span>`EXTENSION_PANEL_ID_DUPLICATE` | `'Duplicate debug extension panel ID: %s.'` | Indicates that an extension panel ID is registered more than once. |
| <span id="case-EXTENSION_PANEL_ID_EMPTY"></span>`EXTENSION_PANEL_ID_EMPTY` | `'Debug extension panel ID must not be empty.'` | Indicates that an extension panel ID is empty. |
| <span id="case-EXTENSION_PANEL_UNKNOWN"></span>`EXTENSION_PANEL_UNKNOWN` | `'Unknown debug extension panel: %s.'` | Indicates that the requested extension panel is not registered. |
| <span id="case-HTTP_REQUEST_EXPECTED"></span>`HTTP_REQUEST_EXPECTED` | `'Expected an HTTP request.'` | Indicates that an event does not provide the expected HTTP request. |
| <span id="case-HTTP_RESPONSE_EXPECTED"></span>`HTTP_RESPONSE_EXPECTED` | `'Expected an HTTP response or null.'` | Indicates that an event provides neither an HTTP response nor `null`. |
| <span id="case-PANEL_ID_MISMATCH"></span>`PANEL_ID_MISMATCH` | `'Debug panel registered as "%s" must match its ID "%s".'` | Indicates that a panel registration key does not match the ID the panel declares. |
| <span id="case-PANEL_METADATA_UNSUPPORTED"></span>`PANEL_METADATA_UNSUPPORTED` | `'Panel %s renders its own title and icon, which configuration cannot override.'` | Indicates that the configuration overrides the title or icon of a panel rendering its own presentation. |
| <span id="case-REQUEST_COLLECTOR_NOT_STARTED"></span>`REQUEST_COLLECTOR_NOT_STARTED` | `'The request collector must be started before collecting a request.'` | Indicates that request capture was attempted before starting the collector. |
| <span id="case-RESPONSE_COLLECTOR_NOT_STARTED"></span>`RESPONSE_COLLECTOR_NOT_STARTED` | `'The request collector must be started before collecting a response.'` | Indicates that response capture was attempted before starting the collector. |
| <span id="case-ROUTE_METADATA_INVALID"></span>`ROUTE_METADATA_INVALID` | `'Captured route metadata must be an array or null.'` | Indicates that the captured route metadata does not carry the expected shape. |
| <span id="case-TOOLBAR_ITEM_INVALID"></span>`TOOLBAR_ITEM_INVALID` | `'Debug toolbar extension panel %s must return only ToolbarItem instances.'` | Indicates that an extension panel returned an item other than a `ToolbarItem` instance. |
| <span id="case-TOOLBAR_ITEMS_NOT_LIST"></span>`TOOLBAR_ITEMS_NOT_LIST` | `'Debug toolbar extension panel %s must return a list of items.'` | Indicates that an extension panel did not return a list of toolbar items. |
| <span id="case-TOOLBAR_OPTION_INVALID"></span>`TOOLBAR_OPTION_INVALID` | `'Debug option "yii3/debug.%s" must be %s.'` | Indicates that a `yii3/debug` parameter read by the toolbar options holds a value of the wrong type. |
| <span id="case-TOOLBAR_PANEL_ID_DUPLICATE"></span>`TOOLBAR_PANEL_ID_DUPLICATE` | `'Duplicate debug toolbar extension panel ID: %s.'` | Indicates that a toolbar extension panel ID is registered more than once. |
| <span id="case-TOOLBAR_PANEL_ID_EMPTY"></span>`TOOLBAR_PANEL_ID_EMPTY` | `'Debug toolbar extension panel ID must not be empty.'` | Indicates that a toolbar extension panel ID is empty. |

## Methods

| Method | Description | Defined by |
| --- | --- | --- |
| [`getMessage()`](#method-getMessage) | Formats the message without changing diagnostic argument values. | `Message` |

## Method details

### getMessage() <span id="method-getMessage"></span>

```php
public function getMessage(int|string ...$argument): string
```

Formats the message without changing diagnostic argument values.

**Parameters**

| Parameter | Type | Description |
| --- | --- | --- |
| `...$argument` | `int\|string` | Values to insert into the message template. |

**Returns**

`string`: Formatted exception message.