update plugin assertion errors
This commit is contained in:
parent
ee713f47db
commit
f35b368a41
10
lib/index.js
10
lib/index.js
|
@ -26,7 +26,7 @@ const MsgV4 = require('ppppp-db/msg-v4')
|
|||
* @returns {asserts peer is { db: PPPPPDB }}
|
||||
*/
|
||||
function assertDBPlugin(peer) {
|
||||
if (!peer.db) throw new Error('conductor plugin needs ppppp-db plugin')
|
||||
if (!peer.db) throw new Error('"conductor" plugin requires "db" plugin')
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -34,7 +34,7 @@ function assertDBPlugin(peer) {
|
|||
* @returns {asserts peer is { goals: PPPPPGoal }}
|
||||
*/
|
||||
function assertGoalsPlugin(peer) {
|
||||
if (!peer.goals) throw new Error('conductor plugin needs ppppp-goals plugin')
|
||||
if (!peer.goals) throw new Error('"conductor" plugin requires "goals" plugin')
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -42,7 +42,7 @@ function assertGoalsPlugin(peer) {
|
|||
* @returns {asserts peer is { set: PPPPPSet }}
|
||||
*/
|
||||
function assertSetPlugin(peer) {
|
||||
if (!peer.set) throw new Error('conductor plugin needs ppppp-set plugin')
|
||||
if (!peer.set) throw new Error('"conductor" plugin requires "set" plugin')
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -50,7 +50,7 @@ function assertSetPlugin(peer) {
|
|||
* @returns {asserts peer is { gc: PPPPPGC }}
|
||||
*/
|
||||
function assertGCPlugin(peer) {
|
||||
if (!peer.gc) throw new Error('conductor plugin needs ppppp-gc plugin')
|
||||
if (!peer.gc) throw new Error('"conductor" plugin requires "gc" plugin')
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -58,7 +58,7 @@ function assertGCPlugin(peer) {
|
|||
* @returns {asserts peer is { sync: PPPPPSync }}
|
||||
*/
|
||||
function assertSyncPlugin(peer) {
|
||||
if (!peer.sync) throw new Error('conductor plugin needs ppppp-sync plugin')
|
||||
if (!peer.sync) throw new Error('"conductor" plugin requires "sync" plugin')
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue