update plugin assertion errors

This commit is contained in:
Andre Staltz 2024-01-02 13:16:13 +02:00
parent ee713f47db
commit f35b368a41
No known key found for this signature in database
GPG Key ID: 9EDE23EA7E8A4890
1 changed files with 5 additions and 5 deletions

View File

@ -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')
}
/**