1
0
mirror of https://github.com/fluencelabs/js-libp2p-interfaces synced 2025-04-12 07:36:10 +00:00

34 lines
635 B
JavaScript
Raw Normal View History

'use strict'
class AbortError extends Error {
constructor () {
super('The operation was aborted')
this.code = AbortError.code
2019-04-18 18:44:17 +08:00
this.type = AbortError.type
}
static get code () {
return 'ABORT_ERR'
}
2019-04-18 18:44:17 +08:00
static get type () {
return 'aborted'
}
}
class AllListenersFailedError extends Error {
constructor () {
super('All listeners failed to listen on any addresses, please verify the addresses you provided are correct')
this.code = AllListenersFailedError.code
}
static get code () {
return 'ERR_ALL_LISTENERS_FAILED'
}
}
module.exports = {
AbortError,
AllListenersFailedError
}