UNPKG

@aptos-labs/ts-sdk

Version:
30 lines 1.03 kB
// Copyright © Aptos Foundation // SPDX-License-Identifier: Apache-2.0 /** * This error is used to explain why parsing failed. * @group Implementation * @category Serialization */ export class ParsingError extends Error { /** * This provides a programmatic way to access why parsing failed. Downstream devs * might want to use this to build their own error messages if the default error * messages are not suitable for their use case. This should be an enum. * @group Implementation * @category Serialization */ invalidReason; /** * Creates an instance of the error with a specified message and invalid reason. * * @param message The error message that describes the issue. * @param invalidReason The reason why the input is considered invalid. * @group Implementation * @category Serialization */ constructor(message, invalidReason) { super(message); this.invalidReason = invalidReason; } } //# sourceMappingURL=common.js.map