({
size,
targetSize,
type,
}: {
size: number
targetSize: number
type: 'hex' | 'bytes'
})
| 45 | } |
| 46 | export class InvalidBytesLengthError extends BaseError { |
| 47 | constructor({ |
| 48 | size, |
| 49 | targetSize, |
| 50 | type, |
| 51 | }: { |
| 52 | size: number |
| 53 | targetSize: number |
| 54 | type: 'hex' | 'bytes' |
| 55 | }) { |
| 56 | super( |
| 57 | `${type.charAt(0).toUpperCase()}${type |
| 58 | .slice(1) |
| 59 | .toLowerCase()} is expected to be ${targetSize} ${type} long, but is ${size} ${type} long.`, |
| 60 | { name: 'InvalidBytesLengthError' }, |
| 61 | ) |
| 62 | } |
| 63 | } |
nothing calls this directly
no outgoing calls
no test coverage detected