the error type, defined by Pendle contracts. It is used to determine the correct type for PendleContractError#args.
the error thrown by Ethers.js that causes this Error.
Readonly
argsOptional
causeBelow ES2022, Error has no cause
.
Adding it here as fallback so it is still accessible.
Readonly
errorReadonly
ethersthe error thrown by Ethers.js that causes this Error.
Optional
stackStatic
errorThe message handlers for the given error.
The handlers are used to generate a descriptive error message (to send to the super
).
This can be overridden to have different error messages (for example, to have more user-friendly messages).
Static
Readonly
errorsStatic
factoryStatic
Optional
prepareOptional override for formatting stack traces
Optional override for formatting stack traces
Static
stackDetermine the error type, by comparing PendleContractError#errorName.
Static
captureStatic
decodeGenerated using TypeDoc
Error class that wrap all error from Pendle contract.
Remarks
As there are a lot of errors that can be returned from the Pendle contract, we only provide one class to wrap all the error. The error name can be access via PendleContractError#errorName, and the arguments can be access via PendleContractError#args.
As we only use one class to wrap all the errors, initially PendleContractError#args will not have a concrete type (you can think of
any[]
). To narrow down which error, with the correct type ofargs
, use PendleContractError#isType.Example
See