ReferenceUtilitiesClass
PartyJSError
The error party.js throws for invalid input.
extends Error
The error party.js throws when it’s given invalid input, for example a color string it cannot parse.
Its error message is prefixed with [party-js].
Example
Section titled “Example”try { confetti(button, { colors: gradient([]) });} catch (error) { if (error instanceof PartyJSError) showHint(error.message); else throw error;}Constructor
Section titled “Constructor”new PartyJSError(message: string);Parameters
Section titled “Parameters”messagestring