提交 a01be59f 编写于 作者: zyjhandsome's avatar zyjhandsome

优化部分示例代码

Signed-off-by: zyjhandsome's avatarzyjhandsome <zyjhandsome@126.com>
上级 31ef4542
...@@ -55,12 +55,12 @@ ...@@ -55,12 +55,12 @@
function FunACall(data) { function FunACall(data) {
// 获取call事件中传递的所有参数 // 获取call事件中传递的所有参数
console.log('FunACall param:' + JSON.stringify(data.readString())); console.info('FunACall param:' + JSON.stringify(data.readString()));
return null; return null;
} }
function FunBCall(data) { function FunBCall(data) {
console.log('FunACall param:' + JSON.stringify(data.readString())); console.info('FunACall param:' + JSON.stringify(data.readString()));
return null; return null;
} }
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
this.callee.on('funA', FunACall); this.callee.on('funA', FunACall);
this.callee.on('funB', FunBCall); this.callee.on('funB', FunBCall);
} catch (error) { } catch (error) {
console.log('register failed with error. Cause: ' + JSON.stringify(error)); console.error(`Failed to register callee on. Cause: ${JSON.stringify(err)}`);
} }
} }
...@@ -81,8 +81,8 @@ ...@@ -81,8 +81,8 @@
try { try {
this.callee.off('funA'); this.callee.off('funA');
this.callee.off('funB'); this.callee.off('funB');
} catch (error) { } catch (err) {
console.log('register failed with error. Cause: ' + JSON.stringify(error)); console.error(`Failed to register callee off. Cause: ${JSON.stringify(err)}`);
} }
} }
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册