error propagation with generated calls
This commit is contained in:
+1
-1
@@ -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
@@ -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)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user