Skip to content

PluginDataParseError

Thrown when a plugin’s data.json exists but is not valid JSON.

The file is never touched when this is thrown. When recoveryCopy is not null, a copy of the file’s raw text was kept on this device first, so even a later save over the file loses nothing.

Import:

import { PluginDataParseError } from '@mnaoumov/obsidian-lib/data-handler';

Signature:

export class PluginDataParseError extends Error

Extends: Error

Constructor

new PluginDataParseError(params: PluginDataParseErrorConstructorParams)

Creates a PluginDataParseError.

Properties

PropertyTypeDescription
pathstringThe path of the plugin's data.json.
pluginIdstringThe manifest.id of the plugin.
pluginNamestringThe manifest.name of the plugin.
recoveryCopynull | SettingsRecoveryCopyThe recovery copy kept of the file, or null when none could be kept.

Links to this page: