error propagation with generated calls

This commit is contained in:
2020-02-25 18:26:46 +01:00
parent 9901785c80
commit ef5a83f1d4
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "rpclibrary", "name": "rpclibrary",
"version": "1.8.2", "version": "1.8.3",
"description": "rpclibrary is a websocket on steroids!", "description": "rpclibrary is a websocket on steroids!",
"main": "./js/Index.js", "main": "./js/Index.js",
"repository": { "repository": {
+2 -2
View File
@@ -175,7 +175,7 @@ export class RPCSocket implements I.Socket{
sesame = appendComma(sesame) sesame = appendComma(sesame)
return eval(`async (${headerArgs}) => { return eval(`async (${headerArgs}) => {
return await this.socket.call("${fnName}", ${sesame} ${argParams}) return await this.call("${fnName}", ${sesame} ${argParams})
}`) }`)
} }
@@ -196,7 +196,7 @@ export class RPCSocket implements I.Socket{
return eval( ` return eval( `
async (${headerArgs} callback) => { async (${headerArgs} callback) => {
const r = await this.socket.call("${fnName}", ${sesame} ${argParams}) const r = await this.call("${fnName}", ${sesame} ${argParams})
if(r && r.result === 'Success'){ if(r && r.result === 'Success'){
this.socket.hook(r.uuid, callback) this.socket.hook(r.uuid, callback)
} }