Skip to main content
Error thrown when a swap operation fails with a known, actionable reason.

Extends

  • Error

Constructors

Constructor

new SwapError(code: SwapErrorCode, message: string): SwapError;
Creates a new SwapError.

Parameters

ParameterTypeDescription
codeSwapErrorCodeThe error code identifying the type of swap failure.
messagestringThe error message.

Returns

SwapError

Overrides

Error.constructor

Properties

PropertyModifierTypeDescription
codepublicSwapErrorCodeThe error code identifying the type of swap failure.