MCPcopy Create free account
hub / github.com/FernhillFable/cluster / wrapErrorData

Function wrapErrorData

lib/client/connection.js:267–276  ·  view source on GitHub ↗
(errorData, fullMessage)

Source from the content-addressed store, hash-verified

265};
266
267function wrapErrorData(errorData, fullMessage) {
268 // wrap in Error object so can be passed through event emitters
269 var err = new Error(errorData.message);
270 err.code = errorData.code;
271 if (fullMessage) {
272 // Add the message data to the error object for more context
273 err.data = fullMessage;
274 }
275 return err;
276}
277
278Connection.prototype._handleBulkMessage = function(err, message, method) {
279 if (message.data) {

Callers 1

connection.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected