PluginDataSizeLimitExceededError
Thrown when a plugin’s data.json is, or would become, larger than the configured limit.
The file on disk is never touched when this is thrown: an oversized existing file is left intact for the user to inspect or trim, and an oversized save is refused before anything is written, so the last good file remains.
Import:
import { PluginDataSizeLimitExceededError } from '@mnaoumov/obsidian-lib/data-handler';Signature:
export class PluginDataSizeLimitExceededError extends ErrorExtends: Error
Constructor
new PluginDataSizeLimitExceededError(params: PluginDataSizeLimitExceededErrorConstructorParams)Creates a PluginDataSizeLimitExceededError.
Properties
| Property | Type | Description |
|---|---|---|
| maxSizeInBytes | number | The size limit, in bytes. |
| operation | PluginDataOperation | The refused operation. |
| path | string | The path of the plugin's data.json. |
| pluginId | string | The manifest.id of the plugin. |
| pluginName | string | The manifest.name of the plugin. |
| sizeInBytes | number | The size of the existing file (load) or of the serialized data (save), in bytes. |
Links to this page: