Interface: LibraryError
Base class for all custom errors in the Vue Editors library. Extends the native Error class and provides additional features such as stack trace trimming and custom name/message handling.
Example
ts
throw new LibraryError("Something went wrong", { trim: 2 });Extends
Error
Extended by
InvalidExecutionContextExceptionCannotAccessDisposedDirectExceptionDirentAlreadyExistsExceptionNoSuchDirentExceptionNotASerializedDirentNotASerializedNVEFileSystemCouldNotCreateMonacoModelForDirentExceptionNoCommitMethodDefinedException
Properties
| Property | Type | Inherited from |
|---|---|---|
cause? | unknown | Error.cause |
stack? | string | Error.stack |
Accessors
[toStringTag]
Get Signature
ts
get toStringTag: string;Returns the string tag for the error (used by Object.prototype.toString).
Returns
string
message
Get Signature
ts
get message(): string;Returns the error message.
Returns
string
Overrides
ts
Error.message;name
Get Signature
ts
get name(): string;Returns the name of the error.
Returns
string
Overrides
ts
Error.name;Methods
[toPrimitive]()
ts
toPrimitive: string | true;Allows the error to be converted to a primitive value.
Parameters
| Parameter | Type | Description |
|---|---|---|
hint | "string" | "number" | "default" | The type hint for the conversion ('number', 'string', or 'default'). |
Returns
string | true
The string representation or true.
toString()
ts
toString(): string;Returns a string representation of the error.
Returns
string
The error as a string.