js-libp2p-noise/src/errors.ts

13 lines
287 B
TypeScript
Raw Normal View History

2020-06-19 13:23:18 +02:00
import BufferList from 'bl'
2020-01-15 17:27:32 +01:00
export class FailedIKError extends Error {
2021-01-26 21:39:37 +00:00
public initialMsg: string|BufferList|Buffer
2020-01-15 17:27:32 +01:00
2020-06-19 13:23:18 +02:00
constructor (initialMsg: string|BufferList|Buffer, message?: string) {
2020-06-19 12:49:40 +02:00
super(message)
2020-01-15 17:27:32 +01:00
2020-06-19 12:49:40 +02:00
this.initialMsg = initialMsg
this.name = 'FailedIKhandshake'
2020-01-15 17:27:32 +01:00
}
2020-06-19 12:49:40 +02:00
}