UNPKG

ox

Version:

Ethereum Standard Library

23 lines 886 B
import * as Errors from '../../Errors.js'; /** * Shared `SizeOverflowError` class for `Bytes` and `Hex`. The `name` is * passed at construction time so a single class identity backs both * `Bytes.SizeOverflowError` and `Hex.SizeOverflowError` re-exports without * forcing `Bytes` and `Hex` to import each other at runtime. * * @internal */ export class BytesSizeOverflowError extends Errors.BaseError { name = 'Bytes.SizeOverflowError'; constructor({ givenSize, maxSize }) { super(`Size cannot exceed \`${maxSize}\` bytes. Given size: \`${givenSize}\` bytes.`); } } /** @internal */ export class HexSizeOverflowError extends Errors.BaseError { name = 'Hex.SizeOverflowError'; constructor({ givenSize, maxSize }) { super(`Size cannot exceed \`${maxSize}\` bytes. Given size: \`${givenSize}\` bytes.`); } } //# sourceMappingURL=errors.js.map