export class TransactionPoolError extends Error { public message : string ; public id : Buffer ; public dataPath : string ; public actual ? : string | number ; public expected ? : string | number ; public constructor ( message = '' , id = Buffer . alloc ( 0 ) , dataPath = '' , actual ? , expected ? ) { super ( ) ; this . message = message ; this . id = id ; this . name = 'TransactionPoolError' ; this . dataPath = dataPath ; this . actual = actual ; this . expected = expected ; } public toString ( ) { const defaultMessage = `TransactionPool: ${ this . id . toString ( 'hex' ) } failed to process at ${ this . dataPath }: ${ this . message }` ; const withActual = this . actual ? `${ defaultMessage }, actual: ${ this . actual }` : defaultMessage ; const withExpected = this . expected ? `${ withActual }, expected: ${ this . expected }` : withActual ; return withExpected ; } }