js-libp2p-noise/src/errors.ts

11 lines
223 B
TypeScript
Raw Normal View History

2020-01-15 17:27:32 +01:00
export class FailedIKError extends Error {
2020-06-19 13:06:31 +02:00
public initialMsg: string;
2020-01-15 17:27:32 +01:00
2020-06-19 13:06:31 +02:00
constructor (initialMsg: string, 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
}