ResourceLockedError
Thrown by the vault-mutation blocker when a plugin tries to edit, delete, rename, move, or create a resource whose path is covered by a lock taken with ResourceLockComponentLockForPathParams.shouldBlockMutations.
instanceof ResourceLockedError is structural: it matches any error named ResourceLockedError that carries a string path, whichever copy of this library threw it. The blocker belongs to the realm-wide lock manager in the shared-state bag, and that manager is built by whichever copy of the library touched it first, so the error a plugin catches is often another plugin’s class.
Import:
import { ResourceLockedError } from '@mnaoumov/obsidian-lib/resource-lock';Signature:
export class ResourceLockedError extends ErrorExtends: Error
Properties
| Property | Type | Description |
|---|---|---|
| path | string | The vault path whose mutation was blocked. |
Methods
| Method | Returns | Description |
|---|---|---|
| static [Symbol.hasInstance](instance) | boolean | Matches a ResourceLockedError thrown by any copy of this library, by its name and path. A subclass keeps the ordinary prototype check. |
Links to this page: