提交 c8ab7817 编写于 作者: fxy060608's avatar fxy060608

wip(uts): add debug info

上级 5e930908
......@@ -17320,10 +17320,13 @@ function getProxy() {
}
function resolveSyncResult(args, res, returnOptions, instanceId, proxy) {
if ((process.env.NODE_ENV !== 'production')) {
console.log('uts.invokeSync.result', res, returnOptions, instanceId, typeof proxy);
console.log('uts.invokeSync.result', JSON.stringify([res, returnOptions, instanceId, typeof proxy]));
}
if (!res) {
throw new Error(JSON.stringify(args));
throw new Error('返回值为:' +
JSON.stringify(res) +
';请求参数为:' +
JSON.stringify(args));
}
// devtools 环境是字符串?
if (isString(res)) {
......
......@@ -29,10 +29,13 @@ function getProxy() {
}
function resolveSyncResult(args, res, returnOptions, instanceId, proxy) {
if ((process.env.NODE_ENV !== 'production')) {
console.log('uts.invokeSync.result', res, returnOptions, instanceId, typeof proxy);
console.log('uts.invokeSync.result', JSON.stringify([res, returnOptions, instanceId, typeof proxy]));
}
if (!res) {
throw new Error(JSON.stringify(args));
throw new Error('返回值为:' +
JSON.stringify(res) +
';请求参数为:' +
JSON.stringify(args));
}
// devtools 环境是字符串?
if (isString(res)) {
......
......@@ -220,14 +220,16 @@ function resolveSyncResult(
if (__DEV__) {
console.log(
'uts.invokeSync.result',
res,
returnOptions,
instanceId,
typeof proxy
JSON.stringify([res, returnOptions, instanceId, typeof proxy])
)
}
if (!res) {
throw new Error(JSON.stringify(args))
throw new Error(
'返回值为:' +
JSON.stringify(res) +
';请求参数为:' +
JSON.stringify(args)
)
}
// devtools 环境是字符串?
if (isString(res)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册