2019-10-21 14:44:17 +02:00
|
|
|
'use strict'
|
|
|
|
|
|
|
|
class UnexpectedPeerError extends Error {
|
|
|
|
constructor (message = 'Unexpected Peer') {
|
|
|
|
super(message)
|
|
|
|
this.code = UnexpectedPeerError.code
|
|
|
|
}
|
|
|
|
|
|
|
|
static get code () {
|
|
|
|
return 'ERR_UNEXPECTED_PEER'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-10-29 12:12:09 +01:00
|
|
|
class InvalidCryptoExchangeError extends Error {
|
|
|
|
constructor (message = 'Invalid crypto exchange') {
|
|
|
|
super(message)
|
|
|
|
this.code = InvalidCryptoExchangeError.code
|
|
|
|
}
|
|
|
|
|
|
|
|
static get code () {
|
|
|
|
return 'ERR_INVALID_CRYPTO_EXCHANGE'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-10-21 14:44:17 +02:00
|
|
|
module.exports = {
|
2019-10-29 12:12:09 +01:00
|
|
|
UnexpectedPeerError,
|
|
|
|
InvalidCryptoExchangeError
|
2019-10-21 14:44:17 +02:00
|
|
|
}
|