# Message

> Exception message templates authored by this package.

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

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

Exception message templates authored by this package.

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

## Cases

| Case | Value | Description |
| --- | --- | --- |
| <span id="case-ACTIVE_TAB_INDEX_INVALID"></span>`ACTIVE_TAB_INDEX_INVALID` | `'The active tab index must identify a supplied tab.'` | Indicates that the active tab index does not identify a supplied tab. |
| <span id="case-BODY_SIZE_INVALID"></span>`BODY_SIZE_INVALID` | `'The maximum body size must be greater than zero.'` | Indicates that the maximum captured body size is not positive. |
| <span id="case-COLLECTOR_ID_DUPLICATE"></span>`COLLECTOR_ID_DUPLICATE` | `'Duplicate debug collector ID: %s.'` | Indicates that a collector ID is registered more than once. |
| <span id="case-COLLECTOR_ID_EMPTY"></span>`COLLECTOR_ID_EMPTY` | `'Debug collector ID must not be empty.'` | Indicates that a collector ID is empty. |
| <span id="case-DATA_DIRECTORY_CREATE_FAILED"></span>`DATA_DIRECTORY_CREATE_FAILED` | `'Unable to create debug data directory: %s'` | Indicates that the debug data directory cannot be created. |
| <span id="case-DATA_DIRECTORY_MODE_FAILED"></span>`DATA_DIRECTORY_MODE_FAILED` | `'Unable to apply debug data directory mode: %s'` | Indicates that permissions cannot be applied to the debug data directory. |
| <span id="case-DATA_FILE_MODE_FAILED"></span>`DATA_FILE_MODE_FAILED` | `'Unable to apply debug data file mode for: %s'` | Indicates that permissions cannot be applied to a debug data file. |
| <span id="case-DATA_FILE_READ_FAILED"></span>`DATA_FILE_READ_FAILED` | `'Unable to read debug data file: %s'` | Indicates that a debug data file cannot be read. |
| <span id="case-DATA_FILE_REMOVE_FAILED"></span>`DATA_FILE_REMOVE_FAILED` | `'Unable to remove debug data file: %s'` | Indicates that a debug data file cannot be removed. |
| <span id="case-DATA_FILE_REPLACE_FAILED"></span>`DATA_FILE_REPLACE_FAILED` | `'Unable to replace debug data file: %s'` | Indicates that a debug data file cannot be replaced. |
| <span id="case-DATA_FILE_ROLLBACK_FAILED"></span>`DATA_FILE_ROLLBACK_FAILED` | `'Unable to roll back debug data file: %s'` | Indicates that a debug data file cannot be restored during rollback. |
| <span id="case-DATA_PATH_NOT_DIRECTORY"></span>`DATA_PATH_NOT_DIRECTORY` | `'Debug data path is not a directory: %s'` | Indicates that the configured debug data path is not a directory. |
| <span id="case-HISTORY_SIZE_INVALID"></span>`HISTORY_SIZE_INVALID` | `'Invalid debug history size: %s'` | Indicates that the configured history size is invalid. |
| <span id="case-LOCK_ACQUIRE_FAILED"></span>`LOCK_ACQUIRE_FAILED` | `'Unable to acquire debug data lock: %s'` | Indicates that the debug data lock cannot be acquired. |
| <span id="case-LOCK_FILE_OPEN_FAILED"></span>`LOCK_FILE_OPEN_FAILED` | `'Unable to open debug data lock file: %s'` | Indicates that the debug data lock file cannot be opened. |
| <span id="case-MANIFEST_EMPTY"></span>`MANIFEST_EMPTY` | `'Debug manifest is empty: %s'` | Indicates that the persisted debug manifest is empty. |
| <span id="case-MANIFEST_READ_ERROR"></span>`MANIFEST_READ_ERROR` | `'Unable to read debug manifest.'` | Indicates a manifest read failure while preserving the original exception. |
| <span id="case-MANIFEST_READ_FAILED"></span>`MANIFEST_READ_FAILED` | `'Unable to read debug manifest: %s'` | Indicates that the specified debug manifest cannot be read. |
| <span id="case-N_PLUS_ONE_THRESHOLD_INVALID"></span>`N_PLUS_ONE_THRESHOLD_INVALID` | `'The N+1 threshold must be at least two.'` | Indicates that the N+1 detection threshold is less than two. |
| <span id="case-PANEL_ICON_INVALID"></span>`PANEL_ICON_INVALID` | `'Debug panel icon key is invalid: "%s".'` | Indicates that a panel icon key does not match the accepted icon key shape. |
| <span id="case-PANEL_ID_DUPLICATE"></span>`PANEL_ID_DUPLICATE` | `'Duplicate debug panel ID: %s.'` | Indicates that a panel ID is registered more than once. |
| <span id="case-PANEL_ID_INVALID"></span>`PANEL_ID_INVALID` | `'Debug panel ID must be a non-empty identifier without surrounding whitespace: "%s".'` | Indicates that a panel ID is empty or carries surrounding whitespace, which is rejected instead of trimmed. |
| <span id="case-PANEL_OPTION_TYPE_INVALID"></span>`PANEL_OPTION_TYPE_INVALID` | `'Debug panel option \'%s\' must be %s.'` | Indicates that a panel option value does not satisfy its expected type. |
| <span id="case-PANEL_OPTION_UNKNOWN"></span>`PANEL_OPTION_UNKNOWN` | `'Unknown debug panel option \'%s\'. Allowed options: %s.'` | Indicates that a panel entry carries a key outside the accepted options. |
| <span id="case-PANEL_OVERRIDE_UNREGISTERED"></span>`PANEL_OVERRIDE_UNREGISTERED` | `'Debug panel override targets an unregistered ID: %s.'` | Indicates that a panel override targets an ID no provider registered and does not disable it. |
| <span id="case-PANEL_POSITION_BUILT_IN"></span>`PANEL_POSITION_BUILT_IN` | `'Debug panel position must not be set on the built-in panel: %s.'` | Indicates that a panel override sets a position on a built-in panel, whose order is fixed. |
| <span id="case-PANEL_TITLE_EMPTY"></span>`PANEL_TITLE_EMPTY` | `'Debug panel title must not be empty.'` | Indicates that a panel title is empty. |
| <span id="case-REGISTRATION_ENABLED_INVALID"></span>`REGISTRATION_ENABLED_INVALID` | `'Debug registration \'%s\' option \'enabled\' must be a boolean.'` | Indicates that a registration entry declares a non-boolean `enabled` option. |
| <span id="case-REGISTRATION_ENTRY_INVALID"></span>`REGISTRATION_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-REGISTRATION_ID_MISMATCH"></span>`REGISTRATION_ID_MISMATCH` | `'Debug %s registered as \'%s\' must match its ID \'%s\'.'` | Indicates that a registration key differs from the ID the registered collector or panel declares. |
| <span id="case-ROUTE_DEFINITION_INVALID"></span>`ROUTE_DEFINITION_INVALID` | `'Route definition key \'%s\' must be %s.'` | Indicates that a route definition field does not satisfy its expected shape. |
| <span id="case-SENSITIVE_KEY_PATTERN_INVALID"></span>`SENSITIVE_KEY_PATTERN_INVALID` | `'Sensitive key pattern "%s" is not a valid PCRE pattern.'` | Indicates that a sensitive key pattern is not a valid PCRE pattern. |
| <span id="case-SENSITIVE_KEY_PREFIX_EMPTY"></span>`SENSITIVE_KEY_PREFIX_EMPTY` | `'Sensitive key prefixes must not be empty.'` | Indicates that a sensitive key prefix is empty. |
| <span id="case-SIDEBAR_GROUP_LABEL_EMPTY"></span>`SIDEBAR_GROUP_LABEL_EMPTY` | `'Sidebar navigation group labels must not be empty.'` | Indicates that a sidebar navigation group label is empty. |
| <span id="case-SNAPSHOT_EMPTY"></span>`SNAPSHOT_EMPTY` | `'Debug snapshot is empty: %s'` | Indicates that a persisted debug snapshot is empty. |
| <span id="case-SNAPSHOT_READ_FAILED"></span>`SNAPSHOT_READ_FAILED` | `'Unable to read debug snapshot: %s'` | Indicates that a debug snapshot cannot be read. |
| <span id="case-SNAPSHOT_TAG_INVALID"></span>`SNAPSHOT_TAG_INVALID` | `'Invalid debug snapshot tag: %s'` | Indicates that a debug snapshot tag is invalid. |
| <span id="case-SNAPSHOT_TAG_MISMATCH"></span>`SNAPSHOT_TAG_MISMATCH` | `'Debug snapshot tag does not match its filename: %s'` | Indicates that a snapshot tag does not match its filename. |
| <span id="case-SNAPSHOT_VALUE_INVALID"></span>`SNAPSHOT_VALUE_INVALID` | `'Invalid debug snapshot value at \'%s\': expected %s.'` | Indicates that a snapshot value violates the expected schema at a payload path. |
| <span id="case-TEMPORARY_FILE_WRITE_FAILED"></span>`TEMPORARY_FILE_WRITE_FAILED` | `'Unable to write temporary debug data file for: %s'` | Indicates that a temporary debug data file cannot be written. |
| <span id="case-TRANSACTION_JOURNAL_INVALID"></span>`TRANSACTION_JOURNAL_INVALID` | `'Invalid debug storage transaction journal: %s'` | Indicates that the storage transaction journal is invalid. |

## 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.