@push-rpc/core
Advanced tools
Comparing version 1.1.8 to 1.1.9
@@ -6,3 +6,3 @@ "use strict"; | ||
if (!name) { | ||
throw new Error("Can't lookup service item " + name); | ||
return { item: null, object: null }; | ||
} | ||
@@ -15,3 +15,3 @@ var names = name.split("/"); | ||
if (!item) { | ||
throw new Error("Can't lookup service item " + name); | ||
return { item: null, object: null }; | ||
} | ||
@@ -18,0 +18,0 @@ return getServiceItem(item, names.slice(1).join("/")); |
@@ -188,3 +188,4 @@ "use strict"; | ||
if (!localTopic) { | ||
throw new Error("Can't find local topic with name " + name); | ||
this.send(rpc_1.MessageType.Error, id, null, "Topic '" + name + "' not implemented", null); | ||
break; | ||
} | ||
@@ -195,3 +196,4 @@ this.subscribe(localTopic, other[0]); | ||
if (!localTopic) { | ||
throw new Error("Can't find local topic with name " + name); | ||
this.send(rpc_1.MessageType.Error, id, null, "Topic '" + name + "' not implemented", null); | ||
break; | ||
} | ||
@@ -202,3 +204,3 @@ this.unsubscribe(localTopic, other[0]); | ||
if (!localTopic) { | ||
this.send(rpc_1.MessageType.Error, id, null, "Topic " + name + " not implemented", {}); | ||
this.send(rpc_1.MessageType.Error, id, null, "Topic '" + name + "' not implemented", null); | ||
break; | ||
@@ -210,3 +212,3 @@ } | ||
if (!method) { | ||
this.send(rpc_1.MessageType.Error, id, null, "Item " + name + " not implemented", {}); | ||
this.send(rpc_1.MessageType.Error, id, null, "Item '" + name + "' not implemented", null); | ||
break; | ||
@@ -219,3 +221,4 @@ } | ||
if (!remoteTopic) { | ||
throw new Error("Can't find remote topic with name " + name); | ||
logger_1.log.debug("Can't find remote topic with name '" + name + "'"); | ||
break; | ||
} | ||
@@ -222,0 +225,0 @@ remoteTopic.receiveData(other[0], other[1]); |
{ | ||
"name": "@push-rpc/core", | ||
"version": "1.1.8", | ||
"version": "1.1.9", | ||
"main": "dist/index.js", | ||
@@ -20,3 +20,3 @@ "types": "dist/index.d.ts", | ||
}, | ||
"gitHead": "8878449ed1a1c0e2ea4a5fbe1d5063958f31b20f" | ||
"gitHead": "570406851d106630e4d006b1fc5a23aae97e7c74" | ||
} |
@@ -20,3 +20,3 @@ /** | ||
if (!name) { | ||
throw new Error(`Can't lookup service item ${name}`) | ||
return {item: null, object: null} | ||
} | ||
@@ -32,3 +32,3 @@ | ||
if (!item) { | ||
throw new Error(`Can't lookup service item ${name}`) | ||
return {item: null, object: null} | ||
} | ||
@@ -35,0 +35,0 @@ |
@@ -163,3 +163,4 @@ import {log} from "./logger" | ||
if (!localTopic) { | ||
throw new Error(`Can't find local topic with name ${name}`) | ||
this.send(MessageType.Error, id, null, `Topic '${name}' not implemented`, null) | ||
break | ||
} | ||
@@ -172,3 +173,4 @@ | ||
if (!localTopic) { | ||
throw new Error(`Can't find local topic with name ${name}`) | ||
this.send(MessageType.Error, id, null, `Topic '${name}' not implemented`, null) | ||
break | ||
} | ||
@@ -181,3 +183,3 @@ | ||
if (!localTopic) { | ||
this.send(MessageType.Error, id, null, `Topic ${name} not implemented`, {}) | ||
this.send(MessageType.Error, id, null, `Topic '${name}' not implemented`, null) | ||
break | ||
@@ -191,3 +193,3 @@ } | ||
if (!method) { | ||
this.send(MessageType.Error, id, null, `Item ${name} not implemented`, {}) | ||
this.send(MessageType.Error, id, null, `Item '${name}' not implemented`, null) | ||
break | ||
@@ -206,3 +208,4 @@ } | ||
if (!remoteTopic) { | ||
throw new Error(`Can't find remote topic with name ${name}`) | ||
log.debug(`Can't find remote topic with name '${name}'`) | ||
break | ||
} | ||
@@ -209,0 +212,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
135796
3630